diff --git a/index.js b/index.js index 917c45f..b77dfbb 100644 --- a/index.js +++ b/index.js @@ -199,7 +199,7 @@ function applyStyle(...args) { } function chalkTag(chalk, ...strings) { - const firstString = strings[0]; + const [firstString] = strings; if (!Array.isArray(firstString)) { // If chalk() was called by itself or with a string, diff --git a/templates.js b/templates.js index 8ce33fe..1f6c035 100644 --- a/templates.js +++ b/templates.js @@ -50,7 +50,7 @@ function parseStyle(style) { let matches; while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; + const name = matches[1]; // eslint-disable-line prefer-destructuring if (matches[2]) { const args = parseArguments(name, matches[2]);