From 2e5b3352a3ab82e4d6fa249f3c74fb8a1f8fad04 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 1 May 2025 16:49:02 -0300 Subject: data, replacer: withContentNodes, splitContentNodesAround --- src/data/composite/wiki-data/withContentNodes.js | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/data/composite/wiki-data/withContentNodes.js (limited to 'src/data/composite/wiki-data/withContentNodes.js') diff --git a/src/data/composite/wiki-data/withContentNodes.js b/src/data/composite/wiki-data/withContentNodes.js new file mode 100644 index 00000000..25352020 --- /dev/null +++ b/src/data/composite/wiki-data/withContentNodes.js @@ -0,0 +1,25 @@ +import {input, templateCompositeFrom} from '#composite'; +import {parseInput} from '#replacer'; + +export default templateCompositeFrom({ + annotation: `withContentNodes`, + + inputs: { + from: input({type: 'string', acceptsNull: false}), + }, + + outputs: ['#contentNodes'], + + steps: () => [ + { + dependencies: [input('from')], + + compute: (continuation, { + [input('from')]: string, + }) => continuation({ + ['#contentNodes']: + parseInput(string), + }), + }, + ], +}); -- cgit 1.3.0-6-gf8a5