« get me outta code hell

data: import Thing.common utilities directly - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/find.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-09-07 12:38:34 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-07 12:38:34 -0300
commiteb00f2993a1aaaba171ad6c918656552f80bb748 (patch)
tree5e61200ed707e02b76c337cb9107aa5f1eaa8898 /src/find.js
parent6889c764caef5542ba9ad8362acf6e8b7b879ea9 (diff)
data: import Thing.common utilities directly
Also rename 'color' (from #cli) to 'colors'.
Diffstat (limited to 'src/find.js')
-rw-r--r--src/find.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/find.js b/src/find.js
index b823080..5ad8dae 100644
--- a/src/find.js
+++ b/src/find.js
@@ -1,6 +1,6 @@
 import {inspect} from 'node:util';
 
-import {color, logWarn} from '#cli';
+import {colors, logWarn} from '#cli';
 
 function warnOrThrow(mode, message) {
   if (mode === 'error') {
@@ -66,7 +66,7 @@ function findHelper(keys, findFns = {}) {
     const found = key ? byDirectory(ref, data, mode) : byName(ref, data, mode);
 
     if (!found) {
-      warnOrThrow(mode, `Didn't match anything for ${color.bright(fullRef)}`);
+      warnOrThrow(mode, `Didn't match anything for ${colors.bright(fullRef)}`);
     }
 
     cacheForThisData[fullRef] = found;
@@ -102,7 +102,7 @@ function matchName(ref, data, mode) {
   if (ref !== thing.name) {
     warnOrThrow(
       mode,
-      `Bad capitalization: ${color.red(ref)} -> ${color.green(thing.name)}`
+      `Bad capitalization: ${colors.red(ref)} -> ${colors.green(thing.name)}`
     );
   }