« 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: 3160a0bf2c9440715bfccc62d3ad5192bd9f0a4e (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 {isURL, validateArrayItems} from '#validators';

// TODO: Not templateCompositeFrom.

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