diff --git a/bin/util/index.js b/bin/util/index.js index 6498df7..e0fa496 100644 --- a/bin/util/index.js +++ b/bin/util/index.js @@ -1,8 +1,7 @@ const { Readable } = require('stream'); const isCommandline = (userAgent) => { - const check = (userAgent.search(/curl|wget/i) !== -1); - return check; + return (userAgent.search(/curl|wget/i) !== -1); }; const getStream = (req, res) => { diff --git a/lib/cli/index.js b/lib/cli/index.js index 08e20de..e0ecd5a 100644 --- a/lib/cli/index.js +++ b/lib/cli/index.js @@ -8,22 +8,22 @@ const color = require('ansi-styles'), const // table color - tblclr = (border) => {return cyan(border);}, + tblclr = (border) => cyan(border), // normal ansi colors - white = (txt) => {return color.white.open+txt+color.white.close;}, - black = (txt) => {return color.black.open+txt+color.black.close;}, - green = (txt) => {return color.green.open+txt+color.green.close;}, - cyan = (txt) => {return color.cyan.open+txt+color.cyan.close;}, - magenta = (txt) => {return color.magenta.open+txt+color.magenta.close;}, - yellow = (txt) => {return color.yellow.open+txt+color.yellow.close;}, - red = (txt) => {return color.red.open+txt+color.red.close;}, + white = (txt) => color.white.open + txt + color.white.close, + black = (txt) => color.black.open + txt + color.black.close, + green = (txt) => color.green.open + txt + color.green.close, + cyan = (txt) => color.cyan.open + txt + color.cyan.close, + magenta = (txt) => color.magenta.open + txt + color.magenta.close, + yellow = (txt) => color.yellow.open + txt + color.yellow.close, + red = (txt) => color.red.open + txt + color.red.close, // bright ansi colors - cyanBright = (txt) => {return color.cyanBright.open+txt+color.cyanBright.close;}, - magentaBright = (txt) => {return color.magentaBright.open+txt+color.magentaBright.close;}, - redBright = (txt) => {return color.redBright.open+txt+color.redBright.close;}, - greenBright = (txt) => {return color.greenBright.open+txt+color.greenBright.close;}, + cyanBright = (txt) => color.cyanBright.open + txt + color.cyanBright.close, + magentaBright = (txt) => color.magentaBright.open + txt + color.magentaBright.close, + redBright = (txt) => color.redBright.open + txt + color.redBright.close, + greenBright = (txt) => color.greenBright.open + txt + color.greenBright.close, // background ansi color - cyanBG = (txt) => {return color.bgCyan.open+txt+color.bgCyan.close;}, + cyanBG = (txt) => color.bgCyan.open + txt + color.bgCyan.close, // horizontal line line = '-'.repeat(60);