« get me outta code hell

data: withReverseContributionList: use withPropertyFromList - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/wiki-data/withReverseContributionList.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-11-16 14:50:07 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-11-17 13:40:00 -0400
commit618004adc31322f6dec3a8608d45854d734fbfe3 (patch)
treed1e22e74e08a7c011e0ae2a731d9f78f0811f8c3 /src/data/composite/wiki-data/withReverseContributionList.js
parent35137cbe060a2c2ec8fcdc09fc6b6bd9e932239f (diff)
data: withReverseContributionList: use withPropertyFromList
Diffstat (limited to 'src/data/composite/wiki-data/withReverseContributionList.js')
-rw-r--r--src/data/composite/wiki-data/withReverseContributionList.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/data/composite/wiki-data/withReverseContributionList.js b/src/data/composite/wiki-data/withReverseContributionList.js
index dcf33c39..2396c3b4 100644
--- a/src/data/composite/wiki-data/withReverseContributionList.js
+++ b/src/data/composite/wiki-data/withReverseContributionList.js
@@ -4,7 +4,8 @@ import withReverseList_template from './helpers/withReverseList-template.js';
 
 import {input} from '#composite';
 
-import {withFlattenedList, withMappedList} from '#composite/data';
+import {withFlattenedList, withMappedList, withPropertyFromList}
+  from '#composite/data';
 
 export default withReverseList_template({
   annotation: `withReverseContributionList`,
@@ -13,21 +14,11 @@ export default withReverseList_template({
   outputName: '#reverseContributionList',
 
   customCompositionSteps: () => [
-    {
-      dependencies: [input('list')],
-      compute: (continuation, {
-        [input('list')]: list,
-      }) => continuation({
-        ['#contributionListMap']:
-          thing => thing[list],
-      }),
-    },
-
-    withMappedList({
+    withPropertyFromList({
       list: input('data'),
-      map: '#contributionListMap',
+      property: input('list'),
     }).outputs({
-      '#mappedList': '#contributionLists',
+      '#values': '#contributionLists',
     }),
 
     withFlattenedList({