« 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/composite/things/content/hasAnnotationPart.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things/content/hasAnnotationPart.js')
-rw-r--r--src/data/composite/things/content/hasAnnotationPart.js28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/data/composite/things/content/hasAnnotationPart.js b/src/data/composite/things/content/hasAnnotationPart.js
index 8b2cbb8b..83d175e3 100644
--- a/src/data/composite/things/content/hasAnnotationPart.js
+++ b/src/data/composite/things/content/hasAnnotationPart.js
@@ -1,8 +1,8 @@
 import {input, templateCompositeFrom} from '#composite';
 
-import {exitWithoutDependency} from '#composite/control-flow';
+import {exposeDependency} from '#composite/control-flow';
 
-import withAnnotationParts from './withAnnotationParts.js';
+import withHasAnnotationPart from './withHasAnnotationPart.js';
 
 export default templateCompositeFrom({
   annotation: `hasAnnotationPart`,
@@ -14,28 +14,12 @@ export default templateCompositeFrom({
   },
 
   steps: () => [
-    withAnnotationParts({
-      mode: input.value('strings'),
+    withHasAnnotationPart({
+      part: input('part'),
     }),
 
-    exitWithoutDependency({
-      dependency: '#annotationParts',
-      value: input.value(false),
+    exposeDependency({
+      dependency: '#hasAnnotationPart',
     }),
-
-    {
-      dependencies: [
-        input('part'),
-        '#annotationParts',
-      ],
-
-      compute: ({
-        [input('part')]: search,
-        ['#annotationParts']: parts,
-      }) =>
-        parts.some(part =>
-          part.toLowerCase() ===
-          search.toLowerCase()),
-    },
   ],
 });