« 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/track/withDate.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things/track/withDate.js')
-rw-r--r--src/data/composite/things/track/withDate.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/data/composite/things/track/withDate.js b/src/data/composite/things/track/withDate.js
deleted file mode 100644
index 1851c0d2..00000000
--- a/src/data/composite/things/track/withDate.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// Gets the track's own date. This is either its dateFirstReleased property
-// or, if unset, the album's date.
-
-import {input, templateCompositeFrom} from '#composite';
-
-import withPropertyFromAlbum from './withPropertyFromAlbum.js';
-
-export default templateCompositeFrom({
-  annotation: `withDate`,
-
-  outputs: ['#date'],
-
-  steps: () => [
-    {
-      dependencies: ['disableDate'],
-      compute: (continuation, {disableDate}) =>
-        (disableDate
-          ? continuation.raiseOutput({'#date': null})
-          : continuation()),
-    },
-
-    {
-      dependencies: ['dateFirstReleased'],
-      compute: (continuation, {dateFirstReleased}) =>
-        (dateFirstReleased
-          ? continuation.raiseOutput({'#date': dateFirstReleased})
-          : continuation()),
-    },
-
-    withPropertyFromAlbum({
-      property: input.value('date'),
-    }),
-
-    {
-      dependencies: ['#album.date'],
-      compute: (continuation, {['#album.date']: albumDate}) =>
-        (albumDate
-          ? continuation.raiseOutput({'#date': albumDate})
-          : continuation.raiseOutput({'#date': null})),
-    },
-  ],
-})