blob: f47086d9ae4e8add28ca435018241124b81dffca (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 | // Shorthand for checking if the track has unique cover art and exposing a
// fallback value if it isn't.
import {input, templateCompositeFrom} from '#composite';
import {exitWithoutDependency} from '#composite/control-flow';
import withHasUniqueCoverArt from './withHasUniqueCoverArt.js';
export default templateCompositeFrom({
  annotation: `exitWithoutUniqueCoverArt`,
  inputs: {
    value: input({defaultValue: null}),
  },
  steps: () => [
    withHasUniqueCoverArt(),
    exitWithoutDependency({
      dependency: '#hasUniqueCoverArt',
      mode: input.value('falsy'),
      value: input('value'),
    }),
  ],
});
 |