« get me outta code hell

data: Content: chop almost everything - 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:
author(quasar) nebula <qznebula@protonmail.com>2025-11-27 15:56:40 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-11-27 15:56:40 -0400
commit3e579167d0b8c52aa31b1136aaa22aa64f11d12b (patch)
tree4c4028322ae0493d7d1967740b2b5cf17a8d5432 /src/data/composite/things/content/hasAnnotationPart.js
parente4b56ce4ee3e32f0425672836af714d3e3d9912c (diff)
data: Content: chop almost everything
Diffstat (limited to 'src/data/composite/things/content/hasAnnotationPart.js')
-rw-r--r--src/data/composite/things/content/hasAnnotationPart.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/data/composite/things/content/hasAnnotationPart.js b/src/data/composite/things/content/hasAnnotationPart.js
index 83d175e3..93aaf5e5 100644
--- a/src/data/composite/things/content/hasAnnotationPart.js
+++ b/src/data/composite/things/content/hasAnnotationPart.js
@@ -1,9 +1,5 @@
 import {input, templateCompositeFrom} from '#composite';
 
-import {exposeDependency} from '#composite/control-flow';
-
-import withHasAnnotationPart from './withHasAnnotationPart.js';
-
 export default templateCompositeFrom({
   annotation: `hasAnnotationPart`,
 
@@ -14,12 +10,16 @@ export default templateCompositeFrom({
   },
 
   steps: () => [
-    withHasAnnotationPart({
-      part: input('part'),
-    }),
+    {
+      dependencies: [input('part'), 'annotationParts'],
 
-    exposeDependency({
-      dependency: '#hasAnnotationPart',
-    }),
+      compute: ({
+        [input('part')]: search,
+        ['annotationParts']: parts,
+      }) =>
+          parts.some(part =>
+            part.toLowerCase() ===
+            search.toLowerCase()),
+    },
   ],
 });