From 98446f3f30dbc0bc8fe55bae1e4729cd023dbf71 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 16 Nov 2024 12:37:10 -0400 Subject: data: factor out inputNotFoundMode --- src/data/composite/wiki-data/withResolvedContribs.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/data/composite/wiki-data/withResolvedContribs.js') diff --git a/src/data/composite/wiki-data/withResolvedContribs.js b/src/data/composite/wiki-data/withResolvedContribs.js index b5d7255b..764d7770 100644 --- a/src/data/composite/wiki-data/withResolvedContribs.js +++ b/src/data/composite/wiki-data/withResolvedContribs.js @@ -8,11 +8,13 @@ import {input, templateCompositeFrom} from '#composite'; import find from '#find'; import {filterMultipleArrays, stitchArrays} from '#sugar'; import thingConstructors from '#things'; -import {is, isContributionList, isDate, isStringNonEmpty} from '#validators'; +import {isContributionList, isDate, isStringNonEmpty} from '#validators'; import {raiseOutputWithoutDependency} from '#composite/control-flow'; import {withPropertiesFromList} from '#composite/data'; +import inputNotFoundMode from './inputNotFoundMode.js'; + export default templateCompositeFrom({ annotation: `withResolvedContribs`, @@ -27,10 +29,7 @@ export default templateCompositeFrom({ acceptsNull: true, }), - notFoundMode: input({ - validate: is('exit', 'filter', 'null'), - defaultValue: 'null', - }), + notFoundMode: inputNotFoundMode(), thingProperty: input({ validate: isStringNonEmpty, -- cgit 1.3.0-6-gf8a5