« get me outta code hell

withFlashSide.js « flash-act « things « composite « data « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/things/flash-act/withFlashSide.js
blob: 64daa1fbffb3f1c16937d0231c706240f02785bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Gets the flash act's side. This will early exit if flashSideData is missing.
// If there's no side whose list of flash acts includes this act, the output
// dependency will be null.

import {input, templateCompositeFrom} from '#composite';

import {withUniqueReferencingThing} from '#composite/wiki-data';

export default templateCompositeFrom({
  annotation: `withFlashSide`,

  outputs: ['#flashSide'],

  steps: () => [
    withUniqueReferencingThing({
      data: 'flashSideData',
      list: input.value('acts'),
    }).outputs({
      ['#uniqueReferencingThing']: '#flashSide',
    }),
  ],
});