From 08b700bb14e5e12c1dff283e2eef729816a97f15 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 26 Jun 2022 20:57:06 -0300 Subject: lots of fixes from eslint --- src/util/sugar.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/util/sugar.js') diff --git a/src/util/sugar.js b/src/util/sugar.js index 0a5de482..2883d949 100644 --- a/src/util/sugar.js +++ b/src/util/sugar.js @@ -90,7 +90,7 @@ export function delay(ms) { // There's a proposal for a native JS function like this, 8ut it's not even // past stage 1 yet: https://github.com/tc39/proposal-regex-escaping export function escapeRegex(string) { - return string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + return string.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); } export function bindOpts(fn, bind) { @@ -319,13 +319,6 @@ function _filterAggregate(mode, promiseAll, array, fn, aggregateOpts) { return value === aggregateOpts.returnOnFail ? value : value.input; } - function wrapperFunction(x, ...rest) { - return { - input: x, - output: fn(x, ...rest), - }; - } - if (mode === 'sync') { const result = array .map( @@ -426,9 +419,7 @@ export function showAggregate( error.errors .map((error) => recursive(error, {level: level + 1})) .flatMap((str) => str.split('\n')) - .map((line, i, lines) => - i === 0 ? ` ${head} ${line}` : ` ${bar} ${line}` - ) + .map((line, i) => i === 0 ? ` ${head} ${line}` : ` ${bar} ${line}`) .join('\n') ); } else { -- cgit 1.3.0-6-gf8a5