handle the ability to pass in variable arguments (ex.

chalk.green("it's", "over", 9000)). updated readme to show support of
variable arguments.
This commit is contained in:
Andrew Kennedy 2013-10-07 00:34:32 -04:00
parent 0133342393
commit 6bb27b7759
3 changed files with 17 additions and 3 deletions

View file

@ -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;
}