« get me outta code hell

lots of fixes from eslint - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/sugar.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-06-26 20:57:06 -0300
committer(quasar) nebula <qznebula@protonmail.com>2022-06-26 20:57:06 -0300
commit08b700bb14e5e12c1dff283e2eef729816a97f15 (patch)
tree0494ff87d7ede3e0d7f561063c08c74011204486 /src/util/sugar.js
parentc6e9aba1f6d1239b3d884c2749d1f0d15c7662a1 (diff)
lots of fixes from eslint
Diffstat (limited to 'src/util/sugar.js')
-rw-r--r--src/util/sugar.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/util/sugar.js b/src/util/sugar.js
index 0a5de48..2883d94 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 {