forked from orbit-oss/chalk
Support template literals for nested calls (#392)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
This commit is contained in:
parent
55816cdd4d
commit
09ddbadcb5
7 changed files with 61 additions and 2 deletions
12
benchmark.js
12
benchmark.js
|
|
@ -47,4 +47,16 @@ suite('chalk', () => {
|
|||
bench('cached: 1 style nested non-intersecting', () => {
|
||||
chalkBgRed(blueStyledString);
|
||||
});
|
||||
|
||||
set('iterations', 10000);
|
||||
|
||||
bench('cached: 1 style template literal', () => {
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
chalkRed`the fox jumps over the lazy dog`;
|
||||
});
|
||||
|
||||
bench('cached: nested styles template literal', () => {
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
chalkRed`the fox {bold jumps} over the {underline lazy} dog`;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue