Closed eperry closed 6 years ago
Maybe this will help you.
console.log(colors.red("isTrue "), colors.green(isTrue));
The nifty way of using colors extends String prototypes, but not Boolean prototypes; so as the above commenter suggested you have to use the non-nifty way to bools. We'd welcome a PR to extend the Boolean class in a similar way as Strings; but otherwise I'll close this issue for now since there is a standard way of handling this already. Thanks!
I believe this to be a bug/unhandled issue with colors
If you use"colors" on boolean values it comes back as undefined not true.{color} or "false.".{color}
I know how to deal with this with an if statement but believe since this is a Language defined type, it should be handled within colors