« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/data/things/composite.js4
-rw-r--r--src/data/things/thing.js8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/data/things/composite.js b/src/data/things/composite.js
index 293952b7..791b8360 100644
--- a/src/data/things/composite.js
+++ b/src/data/things/composite.js
@@ -4,10 +4,10 @@ import {colors} from '#cli';
 import {TupleMap} from '#wiki-data';
 
 import {
+  is,
   isArray,
   isString,
   isWholeNumber,
-  oneOf,
   validateArrayItems,
 } from '#validators';
 
@@ -1567,7 +1567,7 @@ export const exposeConstant = templateCompositeFrom({
 //
 
 const availabilityCheckModeInput = {
-  validate: oneOf('null', 'empty', 'falsy'),
+  validate: is('null', 'empty', 'falsy'),
   defaultValue: 'null',
 };
 
diff --git a/src/data/things/thing.js b/src/data/things/thing.js
index 77f549fe..ef547f74 100644
--- a/src/data/things/thing.js
+++ b/src/data/things/thing.js
@@ -7,7 +7,7 @@ import {colors} from '#cli';
 import find from '#find';
 import {stitchArrays, unique} from '#sugar';
 import {filterMultipleArrays, getKebabCase} from '#wiki-data';
-import {oneOf} from '#validators';
+import {is} from '#validators';
 
 import {
   compositeFrom,
@@ -460,7 +460,7 @@ export const withResolvedContribs = templateCompositeFrom({
     from: input(),
 
     notFoundMode: input({
-      validate: oneOf('exit', 'filter', 'null'),
+      validate: is('exit', 'filter', 'null'),
       defaultValue: 'null',
     }),
   },
@@ -562,7 +562,7 @@ export const withResolvedReference = templateCompositeFrom({
     find: input({type: 'function'}),
 
     notFoundMode: input({
-      validate: oneOf('null', 'exit'),
+      validate: is('null', 'exit'),
       defaultValue: 'null',
     }),
   },
@@ -627,7 +627,7 @@ export const withResolvedReferenceList = templateCompositeFrom({
     find: input({type: 'function'}),
 
     notFoundMode: input({
-      validate: oneOf('exit', 'filter', 'null'),
+      validate: is('exit', 'filter', 'null'),
       defaultValue: 'filter',
     }),
   },