« 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: 04ccf68955fb766ec2dd85daebe3f77065f53acf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// A list of URLs! This will always be present on the data object, even if set
// to an empty array or null.

import {isCuratedURL, validateArrayItems} from '#validators';

// TODO: Not templateCompositeFrom.

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