Comparing version 1.3.0 to 1.3.1
@@ -40,3 +40,3 @@ var colors = require('../safe'); | ||
silly: 'rainbow', | ||
input: 'grey', | ||
input: 'blue', | ||
verbose: 'cyan', | ||
@@ -58,3 +58,3 @@ prompt: 'grey', | ||
// outputs grey text | ||
// outputs blue text | ||
console.log(colors.input('this is an input')); | ||
@@ -66,3 +66,3 @@ | ||
// Load a theme from file | ||
colors.setTheme(__dirname + '/../themes/generic-logging.js'); | ||
colors.setTheme(require(__dirname + '/../themes/generic-logging.js')); | ||
@@ -69,0 +69,0 @@ // outputs red text |
@@ -119,4 +119,4 @@ // Type definitions for Colors.js 1.2 | ||
reset: string; | ||
// @ts-ignore | ||
reset: string; | ||
// @ts-ignore | ||
bold: string; | ||
@@ -123,0 +123,0 @@ dim: string; |
@@ -128,3 +128,5 @@ /* | ||
if (newLinesPresent) { | ||
str = str.replace(newLineRegex, code.close + '\n' + code.open); | ||
str = str.replace(newLineRegex, function(match) { | ||
return code.close + match + code.open; | ||
}); | ||
} | ||
@@ -187,6 +189,6 @@ } | ||
colors.maps = {}; | ||
colors.maps.america = require('./maps/america'); | ||
colors.maps.zebra = require('./maps/zebra'); | ||
colors.maps.rainbow = require('./maps/rainbow'); | ||
colors.maps.random = require('./maps/random'); | ||
colors.maps.america = require('./maps/america')(colors); | ||
colors.maps.zebra = require('./maps/zebra')(colors); | ||
colors.maps.rainbow = require('./maps/rainbow')(colors); | ||
colors.maps.random = require('./maps/random')(colors); | ||
@@ -193,0 +195,0 @@ for (var map in colors.maps) { |
@@ -76,14 +76,12 @@ var colors = require('./colors'); | ||
colors[prop] = colors[theme[prop]]; | ||
addProperty(prop, function() { | ||
return colors[theme[prop]](this); | ||
}); | ||
} else { | ||
addProperty(prop, function() { | ||
var ret = this; | ||
for (var t = 0; t < theme[prop].length; t++) { | ||
ret = colors[theme[prop][t]](ret); | ||
} | ||
return ret; | ||
}); | ||
var tmp = colors[theme[prop][0]]; | ||
for (var t = 1; t < theme[prop].length; t++) { | ||
tmp = tmp[theme[prop][t]]; | ||
} | ||
colors[prop] = tmp; | ||
} | ||
addProperty(prop, function() { | ||
return colors[prop](this); | ||
}); | ||
} | ||
@@ -90,0 +88,0 @@ }); |
@@ -1,4 +0,2 @@ | ||
var colors = require('../colors'); | ||
module['exports'] = (function() { | ||
module['exports'] = function(colors) { | ||
return function(letter, i, exploded) { | ||
@@ -12,2 +10,2 @@ if (letter === ' ') return letter; | ||
}; | ||
})(); | ||
}; |
@@ -1,4 +0,2 @@ | ||
var colors = require('../colors'); | ||
module['exports'] = (function() { | ||
module['exports'] = function(colors) { | ||
// RoY G BiV | ||
@@ -13,3 +11,3 @@ var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; | ||
}; | ||
})(); | ||
}; | ||
@@ -1,4 +0,2 @@ | ||
var colors = require('../colors'); | ||
module['exports'] = (function() { | ||
module['exports'] = function(colors) { | ||
var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', | ||
@@ -12,2 +10,2 @@ 'blue', 'white', 'cyan', 'magenta']; | ||
}; | ||
})(); | ||
}; |
@@ -1,5 +0,5 @@ | ||
var colors = require('../colors'); | ||
module['exports'] = function(letter, i, exploded) { | ||
return i % 2 === 0 ? letter : colors.inverse(letter); | ||
module['exports'] = function(colors) { | ||
return function(letter, i, exploded) { | ||
return i % 2 === 0 ? letter : colors.inverse(letter); | ||
}; | ||
}; |
{ | ||
"name": "colors", | ||
"description": "get colors in your node.js console", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"author": "Marak Squires", | ||
"contributors": [ | ||
{ | ||
"name": "DABH", | ||
"url": "https://github.com/DABH" | ||
}], | ||
"homepage": "https://github.com/Marak/colors.js", | ||
@@ -36,5 +41,5 @@ "bugs": "https://github.com/Marak/colors.js/issues", | ||
"devDependencies": { | ||
"eslint": "^4.19.1", | ||
"eslint": "^5.2.0", | ||
"eslint-config-google": "^0.9.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37480
958
3