Merge pull request #7 from L1fescape/master
Variable arguments and falsy values
This commit is contained in:
commit
5bbb44b5a8
3 changed files with 17 additions and 3 deletions
4
chalk.js
4
chalk.js
|
|
@ -27,7 +27,9 @@ function init() {
|
|||
Object.keys(styles).forEach(function (name) {
|
||||
ret[name] = {
|
||||
get: function () {
|
||||
var obj = defineProps(function self(str) {
|
||||
var obj = defineProps(function self() {
|
||||
var str = [].slice.call(arguments).join(' ');
|
||||
|
||||
if (!chalk.enabled) {
|
||||
return str;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue