« get me outta code hell

data, infra: import validators directly - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/flash.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-09-07 12:06:06 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-07 12:07:03 -0300
commit6889c764caef5542ba9ad8362acf6e8b7b879ea9 (patch)
treea89bb9a9bd9884ffd1c51e4926a04469618f73b3 /src/data/things/flash.js
parent8b379954c9d74f0d47ac32ef395627353940c728 (diff)
data, infra: import validators directly
Diffstat (limited to 'src/data/things/flash.js')
-rw-r--r--src/data/things/flash.js27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/data/things/flash.js b/src/data/things/flash.js
index baef23d..ce2e7fa 100644
--- a/src/data/things/flash.js
+++ b/src/data/things/flash.js
@@ -1,22 +1,19 @@
 import find from '#find';
 
+import {
+  isColor,
+  isDirectory,
+  isNumber,
+  isString,
+  oneOf,
+} from '#validators';
+
 import Thing from './thing.js';
 
 export class Flash extends Thing {
   static [Thing.referenceType] = 'flash';
 
-  static [Thing.getPropertyDescriptors] = ({
-    Artist,
-    Track,
-    FlashAct,
-
-    validators: {
-      isDirectory,
-      isNumber,
-      isString,
-      oneOf,
-    },
-  }) => ({
+  static [Thing.getPropertyDescriptors] = ({Artist, Track, FlashAct}) => ({
     // Update & expose
 
     name: Thing.common.name('Unnamed Flash'),
@@ -111,11 +108,7 @@ export class Flash extends Thing {
 }
 
 export class FlashAct extends Thing {
-  static [Thing.getPropertyDescriptors] = ({
-    validators: {
-      isColor,
-    },
-  }) => ({
+  static [Thing.getPropertyDescriptors] = () => ({
     // Update & expose
 
     name: Thing.common.name('Unnamed Flash Act'),