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.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