diff options
Diffstat (limited to 'src/data/composite/wiki-data/withDirectoryFromName.js')
-rw-r--r-- | src/data/composite/wiki-data/withDirectoryFromName.js | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/data/composite/wiki-data/withDirectoryFromName.js b/src/data/composite/wiki-data/withDirectoryFromName.js deleted file mode 100644 index 034464e4..00000000 --- a/src/data/composite/wiki-data/withDirectoryFromName.js +++ /dev/null @@ -1,42 +0,0 @@ -// Compute a directory from a name - by default the current thing's own name. - -import {input, templateCompositeFrom} from '#composite'; - -import {isName} from '#validators'; -import {getKebabCase} from '#wiki-data'; - -import {raiseOutputWithoutDependency} from '#composite/control-flow'; - -export default templateCompositeFrom({ - annotation: `withDirectoryFromName`, - - inputs: { - name: input({ - validate: isName, - defaultDependency: 'name', - acceptsNull: true, - }), - }, - - outputs: ['#directory'], - - steps: () => [ - raiseOutputWithoutDependency({ - dependency: input('name'), - mode: input.value('falsy'), - output: input.value({ - ['#directory']: null, - }), - }), - - { - dependencies: [input('name')], - compute: (continuation, { - [input('name')]: name, - }) => continuation({ - ['#directory']: - getKebabCase(name), - }), - }, - ], -}); |