« get me outta code hell

data: fix calls to oneOf instead of is - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-09-23 22:14:11 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-23 22:14:11 -0300
commitb4137b02f09761b78c520e5514381cda714dcf6d (patch)
tree4d1184bf8e27afa31842e2c33cca8e725a040c83 /src
parent8d674012710d673b773e13b0cf0be9abba6ccc00 (diff)
data: fix calls to oneOf instead of is
Diffstat (limited to 'src')
-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',
     }),
   },