ES2015ify the codebase

This commit is contained in:
Sindre Sorhus 2017-06-20 19:18:21 +02:00
parent cb3f2308e1
commit 249b9ac7e7
7 changed files with 223 additions and 237 deletions

View file

@ -1,24 +1,24 @@
/* globals set bench */
'use strict';
var chalk = require('./');
const chalk = require('.');
suite('chalk', function () {
suite('chalk', () => {
set('iterations', 100000);
bench('single style', function () {
bench('single style', () => {
chalk.red('the fox jumps over the lazy dog');
});
bench('several styles', function () {
bench('several styles', () => {
chalk.blue.bgRed.bold('the fox jumps over the lazy dog');
});
var cached = chalk.blue.bgRed.bold;
bench('cached styles', function () {
const cached = chalk.blue.bgRed.bold;
bench('cached styles', () => {
cached('the fox jumps over the lazy dog');
});
bench('nested styles', function () {
bench('nested styles', () => {
chalk.red('the fox jumps', chalk.underline.bgBlue('over the lazy dog') + '!');
});
});