From 618004adc31322f6dec3a8608d45854d734fbfe3 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 16 Nov 2024 14:50:07 -0400 Subject: data: withReverseContributionList: use withPropertyFromList --- .../wiki-data/withReverseContributionList.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'src/data/composite/wiki-data') 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({ -- cgit 1.3.0-6-gf8a5