diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-19 14:13:31 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-08-19 14:13:31 -0300 |
commit | ef8acc5d50fa3c23bd7c9d4bb720b7ff78581981 (patch) | |
tree | 6c061e3771cb47619ce9163b559053504a000641 /src/data/things/track.js | |
parent | 37ef3f288fce9bd65a2cd86107239e22f977e78d (diff) |
clean up imports & miscellaneous metastructures across codebase
Diffstat (limited to 'src/data/things/track.js')
-rw-r--r-- | src/data/things/track.js | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js index 36e3adb..e176acb 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -1,10 +1,10 @@ -import Thing from './thing.js'; +import {inspect} from 'node:util'; -import {inspect} from 'util'; +import {color} from '#cli'; +import find from '#find'; +import {empty} from '#sugar'; -import {color} from '../../util/cli.js'; -import find from '../../util/find.js'; -import {empty} from '../../util/sugar.js'; +import Thing from './thing.js'; export class Track extends Thing { static [Thing.referenceType] = 'track'; @@ -47,7 +47,15 @@ export class Track extends Thing { hasCoverArt: { flags: {update: true, expose: true}, - update: {validate: isBoolean}, + update: { + validate(value) { + if (value !== false) { + throw new TypeError(`Expected false or null`); + } + + return true; + }, + }, expose: { dependencies: ['albumData', 'coverArtistContribsByRef'], |