mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
Simplify the function code, using the arrow function
This commit is contained in:
parent
52b2b513a6
commit
3584938e06
@ -2,12 +2,7 @@
|
||||
|
||||
exports.encodeHtml = (str) => str.replace(/</g, '<').replace(/>/g, '>')
|
||||
|
||||
exports.getContext = function (req, res) {
|
||||
return {
|
||||
req: req,
|
||||
res: res
|
||||
}
|
||||
}
|
||||
exports.getContext = (req, res) => ({ req, res })
|
||||
|
||||
exports.setAnsiColors = function (ansiHTML) {
|
||||
ansiHTML.setColors({
|
||||
|
Loading…
Reference in New Issue
Block a user