colors-mini
Advanced tools
Comparing version 1.0.1 to 1.0.2
13
index.js
'use strict'; | ||
var codes = { | ||
@@ -14,3 +13,2 @@ 'white': 37, | ||
}; | ||
function Render(code) { | ||
@@ -22,8 +20,5 @@ return function(s) { | ||
}; | ||
var colors = {} | ||
var keys = Object.keys(codes) | ||
for (var i = keys.length - 1; i >= 0; i--) { | ||
var key = keys[i]; | ||
colors[key] = new Render(codes[key]) | ||
}; | ||
module.exports = colors; | ||
var colors = module.exports = {}; | ||
Object.keys(codes).forEach(function(i){ | ||
colors[i] = new Render(codes[i]) | ||
}) |
{ | ||
"name": "colors-mini", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A mini colors tools", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,2 +13,4 @@ colors | ||
```javascript | ||
var colors = require('colors-mini') | ||
// api | ||
console.log(colors.white(37)) | ||
@@ -15,0 +17,0 @@ console.log(colors.grey(90)) |
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
24
1624
22