Commit graph

12 commits

Author SHA1 Message Date
Sindre Sorhus
90bd6477d6 add .hasColor() method - fixes #23 2014-06-24 21:34:11 +02:00
Sindre Sorhus
763b167349 refactor and extract the RegExp escaping 2014-06-24 17:13:41 +02:00
Joshua Appelman
d16b0ce367 Adds support for nested chalk expressions.
green(a + blue(b) + c) will now look the same as green(a) +
blue(b) + green(c), as expected. In the previous implementation the
output would have been green(a) + blue(b) + c, because the reset code of
the second expression would close all expressions around it as well.

Now this reset code is replaced by a start code of the outer lying
expression, both stopping the inner and re-starting the outer.
2014-06-23 13:25:47 +02:00
Sindre Sorhus
cf7eb2d0c7 various tweaks 2014-06-04 01:47:53 +02:00
Sindre Sorhus
af4983c011 bump strip-ansi 2014-03-26 16:37:06 +01:00
Sindre Sorhus
d30fd3c3bd improve package.json 2013-12-13 20:27:10 +01:00
Sindre Sorhus
492d63916c don't output escape codes if the input is empty 2013-12-08 01:07:21 +01:00
Sindre Sorhus
879defda72 Update to latest ansi-styles 2013-12-08 01:02:35 +01:00
Andrew Kennedy
6bb27b7759 handle the ability to pass in variable arguments (ex.
chalk.green("it's", "over", 9000)). updated readme to show support of
variable arguments.
2013-10-08 11:03:14 -04:00
Sindre Sorhus
38efc4600b Alias grey to gray. Fixes #3 2013-08-29 16:14:18 +02:00
Sindre Sorhus
c323bf0caf Add support for nested styles 2013-08-03 18:47:47 +02:00
Sindre Sorhus
cffc3552b0 init 2013-08-03 02:18:58 +02:00