From cad44bfd247272ea8c11764d3b65dfd6a1b2b224 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 1 May 2025 12:43:58 -0300 Subject: data: #things/commentary-entry -> #things/content --- .../composite/things/commentary-entry/index.js | 1 - .../things/commentary-entry/withWebArchiveDate.js | 41 ---------------------- 2 files changed, 42 deletions(-) delete mode 100644 src/data/composite/things/commentary-entry/index.js delete mode 100644 src/data/composite/things/commentary-entry/withWebArchiveDate.js (limited to 'src/data/composite/things/commentary-entry') diff --git a/src/data/composite/things/commentary-entry/index.js b/src/data/composite/things/commentary-entry/index.js deleted file mode 100644 index 091bae1a..00000000 --- a/src/data/composite/things/commentary-entry/index.js +++ /dev/null @@ -1 +0,0 @@ -export {default as withWebArchiveDate} from './withWebArchiveDate.js'; 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)), - }), - }, - ], -}); -- cgit 1.3.0-6-gf8a5