« get me outta code hell

additionalNameList.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/additionalNameList.js
blob: c5971d4ac2c93c084b7ed4c38e930d59ff9fd1c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// A list of additional names! These can be used for a variety of purposes,
// e.g. providing extra searchable titles, localizations, romanizations or
// original titles, and so on. Each item has a name and, optionally, a
// descriptive annotation.

import {isAdditionalNameList} from '#validators';

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