Skip to content

Commit 6092564

Browse files
authored
Merge pull request OSSPhilippines#6 from ianvizarra/dev
Improved code readability
2 parents 689dc40 + c3f889a commit 6092564

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

bin/util/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
const { Readable } = require('stream');
22

33
const isCommandline = (userAgent) => {
4-
const check = (userAgent.search(/curl|wget/i) !== -1);
5-
return check;
4+
return (userAgent.search(/curl|wget/i) !== -1);
65
};
76

87
const getStream = (req, res) => {

lib/cli/index.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ const color = require('ansi-styles'),
88

99
const
1010
// table color
11-
tblclr = (border) => {return cyan(border);},
11+
tblclr = (border) => cyan(border),
1212
// normal ansi colors
13-
white = (txt) => {return color.white.open+txt+color.white.close;},
14-
black = (txt) => {return color.black.open+txt+color.black.close;},
15-
green = (txt) => {return color.green.open+txt+color.green.close;},
16-
cyan = (txt) => {return color.cyan.open+txt+color.cyan.close;},
17-
magenta = (txt) => {return color.magenta.open+txt+color.magenta.close;},
18-
yellow = (txt) => {return color.yellow.open+txt+color.yellow.close;},
19-
red = (txt) => {return color.red.open+txt+color.red.close;},
13+
white = (txt) => color.white.open + txt + color.white.close,
14+
black = (txt) => color.black.open + txt + color.black.close,
15+
green = (txt) => color.green.open + txt + color.green.close,
16+
cyan = (txt) => color.cyan.open + txt + color.cyan.close,
17+
magenta = (txt) => color.magenta.open + txt + color.magenta.close,
18+
yellow = (txt) => color.yellow.open + txt + color.yellow.close,
19+
red = (txt) => color.red.open + txt + color.red.close,
2020
// bright ansi colors
21-
cyanBright = (txt) => {return color.cyanBright.open+txt+color.cyanBright.close;},
22-
magentaBright = (txt) => {return color.magentaBright.open+txt+color.magentaBright.close;},
23-
redBright = (txt) => {return color.redBright.open+txt+color.redBright.close;},
24-
greenBright = (txt) => {return color.greenBright.open+txt+color.greenBright.close;},
21+
cyanBright = (txt) => color.cyanBright.open + txt + color.cyanBright.close,
22+
magentaBright = (txt) => color.magentaBright.open + txt + color.magentaBright.close,
23+
redBright = (txt) => color.redBright.open + txt + color.redBright.close,
24+
greenBright = (txt) => color.greenBright.open + txt + color.greenBright.close,
2525
// background ansi color
26-
cyanBG = (txt) => {return color.bgCyan.open+txt+color.bgCyan.close;},
26+
cyanBG = (txt) => color.bgCyan.open + txt + color.bgCyan.close,
2727
// horizontal line
2828
line = '-'.repeat(60);
2929

0 commit comments

Comments
 (0)