diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-18 22:42:12 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-18 22:42:12 -0400 |
commit | 2356d2c44736fb83021dacb551625852111c8ce6 (patch) | |
tree | 10408d22fdd7a358d2f5c5917c3b59e55aa4c19d /src/arguments/tinyColor.ts | |
parent | 8aed6f93f7740c592cbc0e2f9fd3269c05286077 (diff) | |
download | tanzanite-2356d2c44736fb83021dacb551625852111c8ce6.tar.gz tanzanite-2356d2c44736fb83021dacb551625852111c8ce6.tar.bz2 tanzanite-2356d2c44736fb83021dacb551625852111c8ce6.zip |
restructure, experimental presence and member automod, fixed bugs probably made some more bugs
Diffstat (limited to 'src/arguments/tinyColor.ts')
-rw-r--r-- | src/arguments/tinyColor.ts | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/arguments/tinyColor.ts b/src/arguments/tinyColor.ts deleted file mode 100644 index 148c078..0000000 --- a/src/arguments/tinyColor.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { BushArgumentTypeCaster } from '#lib'; -import assert from 'assert/strict'; -import tinycolorModule from 'tinycolor2'; -assert(tinycolorModule); - -export const tinyColor: BushArgumentTypeCaster<string | null> = (_message, phrase) => { - // if the phase is a number it converts it to hex incase it could be representing a color in decimal - const newPhase = isNaN(phrase as any) ? phrase : `#${Number(phrase).toString(16)}`; - return tinycolorModule(newPhase).isValid() ? newPhase : null; -}; |