diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-01-11 20:49:26 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-01-11 20:49:26 -0400 |
commit | 77fc589466fc0c04326231638c5ec6026e7948d4 (patch) | |
tree | dbc019e4f72851bd3fa8fd5195d87fe6f6177f7c /src/data/composite/wiki-properties/soupyReverse.js | |
parent | 3bb0a89e80fddb985cc1fc4775e58b0d4a7445dc (diff) |
data: soupy reverse
Diffstat (limited to 'src/data/composite/wiki-properties/soupyReverse.js')
-rw-r--r-- | src/data/composite/wiki-properties/soupyReverse.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/data/composite/wiki-properties/soupyReverse.js b/src/data/composite/wiki-properties/soupyReverse.js new file mode 100644 index 00000000..269ccd6f --- /dev/null +++ b/src/data/composite/wiki-properties/soupyReverse.js @@ -0,0 +1,22 @@ +import {isObject} from '#validators'; + +import {inputSoupyReverse} from '#composite/wiki-data'; + +function soupyReverse() { + return { + flags: {update: true}, + update: {validate: isObject}, + }; +} + +soupyReverse.input = inputSoupyReverse.input; + +soupyReverse.contributionsBy = + (bindTo, contributionsProperty) => ({ + bindTo, + + referencing: thing => thing[contributionsProperty], + referenced: contrib => [contrib.artist], + }); + +export default soupyReverse; |