/
var
/
www
/
verywell.gr
/
server
/
delivery
/
node_modules
/
cli-color
/
lib
/
/var/www/verywell.gr/server/delivery/node_modules/cli-color/lib
mkdir
upload
Name
Size
Mode
Actions
sgr.js
2547
0644
edit
dl
rm
supports-color.js
661
0644
edit
dl
rm
xterm-colors.js
2625
0644
edit
dl
rm
xterm-match.js
940
0644
edit
dl
rm
Edit:
/var/www/verywell.gr/server/delivery/node_modules/cli-color/lib/xterm-match.js
(940B)
"use strict"; var push = Array.prototype.push , reduce = Array.prototype.reduce , abs = Math.abs , colors , match , result , i; colors = require("./xterm-colors").map(function (color) { return { r: parseInt(color.slice(0, 2), 16), g: parseInt(color.slice(2, 4), 16), b: parseInt(color.slice(4), 16) }; }); match = colors.slice(0, 16); module.exports = result = []; i = 0; while (i < 8) { result.push(30 + i++); } i = 0; while (i < 8) { result.push(90 + i++); } push.apply( result, colors.slice(16).map(function (data) { var index, diff = Infinity; match.every(function (innerMatch, currentIndex) { var ndiff = reduce.call( "rgb", function (currentDiff, channel) { currentDiff += abs(innerMatch[channel] - data[channel]); return currentDiff; }, 0 ); if (ndiff < diff) { index = currentIndex; diff = ndiff; } return ndiff; }); return result[index]; }) );
Save
cmd:
run