diff options
Diffstat (limited to 'src/data/composite/wiki-properties/commentary.js')
-rw-r--r-- | src/data/composite/wiki-properties/commentary.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/data/composite/wiki-properties/commentary.js b/src/data/composite/wiki-properties/commentary.js new file mode 100644 index 0000000..cd6b7ac --- /dev/null +++ b/src/data/composite/wiki-properties/commentary.js @@ -0,0 +1,30 @@ +// Artist commentary! Generally present on tracks and albums. + +import {input, templateCompositeFrom} from '#composite'; +import {isCommentary} from '#validators'; + +import {exitWithoutDependency, exposeDependency} + from '#composite/control-flow'; +import {withParsedCommentaryEntries} from '#composite/wiki-data'; + +export default templateCompositeFrom({ + annotation: `commentary`, + + compose: false, + + steps: () => [ + exitWithoutDependency({ + dependency: input.updateValue({validate: isCommentary}), + mode: input.value('falsy'), + value: input.value(null), + }), + + withParsedCommentaryEntries({ + from: input.updateValue(), + }), + + exposeDependency({ + dependency: '#parsedCommentaryEntries', + }), + ], +}); |