« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/data')
-rw-r--r--src/data/checks.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/data/checks.js b/src/data/checks.js
index ad86087..96f4cd8 100644
--- a/src/data/checks.js
+++ b/src/data/checks.js
@@ -4,7 +4,7 @@ import {inspect as nodeInspect} from 'node:util';
 import {colors, ENABLE_COLOR} from '#cli';
 
 import CacheableObject from '#cacheable-object';
-import {compareArrays, empty} from '#sugar';
+import {compareArrays, empty, getNestedProp} from '#sugar';
 import Thing from '#thing';
 import thingConstructors from '#things';
 import {commentaryRegexCaseSensitive} from '#wiki-data';
@@ -167,13 +167,6 @@ export function filterReferenceErrors(wikiData, {
     }],
   ];
 
-  function getNestedProp(obj, key) {
-    const recursive = (o, k) =>
-      k.length === 1 ? o[k[0]] : recursive(o[k[0]], k.slice(1));
-    const keys = key.split(/(?<=(?<!\\)(?:\\\\)*)\./);
-    return recursive(obj, keys);
-  }
-
   const boundFind = bindFind(wikiData, {mode: 'error'});
 
   const findArtistOrAlias = artistRef => {