forked from orbit-oss/chalk
return a new function for each getter
- defines the getters onto a proto - the function returned has its __proto__ set to our proto fixes #32
This commit is contained in:
parent
3073fa3110
commit
42918337e5
4 changed files with 34 additions and 6 deletions
|
|
@ -11,6 +11,11 @@ suite('chalk', function () {
|
|||
chalk.blue.bgRed.bold('the fox jumps over the lazy dog');
|
||||
});
|
||||
|
||||
var cached = chalk.blue.bgRed.bold;
|
||||
bench('cached styles', function () {
|
||||
cached('the fox jumps over the lazy dog');
|
||||
});
|
||||
|
||||
bench('nested styles', function () {
|
||||
chalk.red('the fox jumps', chalk.underline.bgBlue('over the lazy dog') + '!');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue