diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-07-01 08:12:57 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-07-01 08:12:57 -0300 |
commit | 1f41b6f13fe1ccfa0a6e847629448a680b1b1be4 (patch) | |
tree | 3c14e4e0e92bfefd485e901ccfb3a7790866c2eb /src/data/composite/wiki-data/exitWithoutArtwork.js | |
parent | 6802a68176ec7e97eda29999f130a4e63b853a94 (diff) |
data: exitWithoutArtwork
Diffstat (limited to 'src/data/composite/wiki-data/exitWithoutArtwork.js')
-rw-r--r-- | src/data/composite/wiki-data/exitWithoutArtwork.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/data/composite/wiki-data/exitWithoutArtwork.js b/src/data/composite/wiki-data/exitWithoutArtwork.js new file mode 100644 index 00000000..8e799fda --- /dev/null +++ b/src/data/composite/wiki-data/exitWithoutArtwork.js @@ -0,0 +1,45 @@ +import {input, templateCompositeFrom} from '#composite'; +import {isContributionList, isThing, strictArrayOf} from '#validators'; + +import {exitWithoutDependency} from '#composite/control-flow'; + +import withHasArtwork from './withHasArtwork.js'; + +export default templateCompositeFrom({ + annotation: `exitWithoutArtwork`, + + inputs: { + contribs: input({ + validate: isContributionList, + defaultValue: null, + }), + + artwork: input({ + validate: isThing, + defaultValue: null, + }), + + artworks: input({ + validate: strictArrayOf(isThing), + defaultValue: null, + }), + + value: input({ + defaultValue: null, + }), + }, + + steps: () => [ + withHasArtwork({ + contribs: input('contribs'), + artwork: input('artwork'), + artworks: input('artworks'), + }), + + exitWithoutDependency({ + dependency: '#hasArtwork', + mode: input.value('falsy'), + value: input('value'), + }), + ], +}); |