mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
Merge pull request #104 from limichange/master
Simplify the function code, using the arrow function
This commit is contained in:
commit
18c694d5ce
@ -2,12 +2,7 @@
|
|||||||
|
|
||||||
exports.encodeHtml = (str) => str.replace(/</g, '<').replace(/>/g, '>')
|
exports.encodeHtml = (str) => str.replace(/</g, '<').replace(/>/g, '>')
|
||||||
|
|
||||||
exports.getContext = function (req, res) {
|
exports.getContext = (req, res) => ({ req, res })
|
||||||
return {
|
|
||||||
req: req,
|
|
||||||
res: res
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.setAnsiColors = function (ansiHTML) {
|
exports.setAnsiColors = function (ansiHTML) {
|
||||||
ansiHTML.setColors({
|
ansiHTML.setColors({
|
||||||
|
Loading…
Reference in New Issue
Block a user