diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-11-16 12:37:10 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-11-17 13:39:59 -0400 |
commit | 98446f3f30dbc0bc8fe55bae1e4729cd023dbf71 (patch) | |
tree | 4f1be795a4eeee36397d850f1b049f00db2dcb17 /src/data/composite/wiki-data/withResolvedReferenceList.js | |
parent | aa800e588c498c2a454fa8d996bb679b5cfe5bb7 (diff) |
data: factor out inputNotFoundMode
Diffstat (limited to 'src/data/composite/wiki-data/withResolvedReferenceList.js')
-rw-r--r-- | src/data/composite/wiki-data/withResolvedReferenceList.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/data/composite/wiki-data/withResolvedReferenceList.js b/src/data/composite/wiki-data/withResolvedReferenceList.js index 42f0e175..f929d400 100644 --- a/src/data/composite/wiki-data/withResolvedReferenceList.js +++ b/src/data/composite/wiki-data/withResolvedReferenceList.js @@ -5,13 +5,12 @@ // to early exit ({notFoundMode: 'exit'}) or leave null in place ('null'). import {input, templateCompositeFrom} from '#composite'; -import {is, isString, validateArrayItems} from '#validators'; +import {isString, validateArrayItems} from '#validators'; -import { - exitWithoutDependency, - raiseOutputWithoutDependency, -} from '#composite/control-flow'; +import {exitWithoutDependency, raiseOutputWithoutDependency} + from '#composite/control-flow'; +import inputNotFoundMode from './inputNotFoundMode.js'; import inputWikiData from './inputWikiData.js'; export default templateCompositeFrom({ @@ -26,10 +25,7 @@ export default templateCompositeFrom({ data: inputWikiData({allowMixedTypes: true}), find: input({type: 'function'}), - notFoundMode: input({ - validate: is('exit', 'filter', 'null'), - defaultValue: 'filter', - }), + notFoundMode: inputNotFoundMode(), }, outputs: ['#resolvedReferenceList'], |