« get me outta code hell

urls.js « wiki-properties « composite « data « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/wiki-properties/urls.js
blob: 5525b462f57b1aa896dee47488a092cb9a58f594 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// A list of URLs! This will always be present on the data object, even if set
// to an empty array or null.

import {isCuratedURLList} from '#validators';
import {templateCompositeFrom} from '#composite';

export default function() {
  return {
    flags: {update: true, expose: true},
    update: {validate: isCuratedURLList},
    expose: {transform: value => value ?? []},
  };
}