File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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' ) ;
1513var _ = 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.
2316exports . 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
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments