From 3584938e064827dd0f1ea0b9a47c0026d2e6e003 Mon Sep 17 00:00:00 2001 From: limichange Date: Thu, 5 Jan 2017 07:56:20 +0800 Subject: [PATCH] Simplify the function code, using the arrow function --- lib/utils.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index f6aa4ef0e6..5dea7e2a40 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -2,12 +2,7 @@ exports.encodeHtml = (str) => str.replace(//g, '>') -exports.getContext = function (req, res) { - return { - req: req, - res: res - } -} +exports.getContext = (req, res) => ({ req, res }) exports.setAnsiColors = function (ansiHTML) { ansiHTML.setColors({