Skip to content

Commit a67ce89

Browse files
committed
Replace colors with chalk and remove underscore.string
1 parent 9cfff94 commit a67ce89

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

index.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,8 @@
99

1010
'use strict';
1111

12-
// Requiring this here modifies the String prototype!
13-
require('colors');
14-
// The upcoming lodash 2.5+ should remove the need for underscore.string.
12+
var chalk = require('chalk');
1513
var _ = require('lodash');
16-
_.str = require('underscore.string');
17-
_.mixin(_.str.exports());
18-
// TODO: ADD CHALK
19-
20-
// Static methods.
2114

2215
// Pretty-format a word list.
2316
exports.wordlist = function(arr, options) {
@@ -26,7 +19,7 @@ exports.wordlist = function(arr, options) {
2619
color: 'cyan'
2720
});
2821
return arr.map(function(item) {
29-
return options.color ? String(item)[options.color] : item;
22+
return options.color ? chalk[options.color](item) : item;
3023
}).join(options.separator);
3124
};
3225

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
"legacy"
2525
],
2626
"dependencies": {
27-
"colors": "^1.1.2",
28-
"lodash": "^4.3.0",
29-
"underscore.string": "~3.2.3"
27+
"chalk": "~1.1.1",
28+
"lodash": "~4.3.0"
3029
},
3130
"devDependencies": {
3231
"grunt": "~0.4.4",

0 commit comments

Comments
 (0)