« 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/commentary-entry/withWebArchiveDate.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things/commentary-entry/withWebArchiveDate.js')
-rw-r--r--src/data/composite/things/commentary-entry/withWebArchiveDate.js41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/data/composite/things/commentary-entry/withWebArchiveDate.js b/src/data/composite/things/commentary-entry/withWebArchiveDate.js
deleted file mode 100644
index 3aaa4f64..00000000
--- a/src/data/composite/things/commentary-entry/withWebArchiveDate.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import {input, templateCompositeFrom} from '#composite';
-
-import {raiseOutputWithoutDependency} from '#composite/control-flow';
-
-export default templateCompositeFrom({
-  annotation: `withWebArchiveDate`,
-
-  outputs: ['#webArchiveDate'],
-
-  steps: () => [
-    {
-      dependencies: ['annotation'],
-
-      compute: (continuation, {annotation}) =>
-        continuation({
-          ['#dateText']:
-            annotation
-              ?.match(/https?:\/\/web.archive.org\/web\/([0-9]{8,8})[0-9]*\//)
-              ?.[1] ??
-            null,
-        }),
-    },
-
-    raiseOutputWithoutDependency({
-      dependency: '#dateText',
-      output: input.value({['#webArchiveDate']: null}),
-    }),
-
-    {
-      dependencies: ['#dateText'],
-      compute: (continuation, {['#dateText']: dateText}) =>
-        continuation({
-          ['#webArchiveDate']:
-            new Date(
-              dateText.slice(0, 4) + '/' +
-              dateText.slice(4, 6) + '/' +
-              dateText.slice(6, 8)),
-        }),
-    },
-  ],
-});