« get me outta code hell

name.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/name.js
blob: 5146488b6f41625441ccc28ef85bf45378923a4c (plain)
1
2
3
4
5
6
7
8
9
10
11
// A wiki data object's name! Its directory (i.e. unique identifier) will be
// computed based on this value if not otherwise specified.

import {isName} from '#validators';

export default function(defaultName) {
  return {
    flags: {update: true, expose: true},
    update: {validate: isName, default: defaultName},
  };
}