diff options
Diffstat (limited to 'src/arguments')
-rw-r--r-- | src/arguments/abbreviatedNumber.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arguments/abbreviatedNumber.ts b/src/arguments/abbreviatedNumber.ts new file mode 100644 index 0000000..9da7063 --- /dev/null +++ b/src/arguments/abbreviatedNumber.ts @@ -0,0 +1,6 @@ +import { BushArgumentTypeCaster } from '@lib'; +import numeral = require('numeral'); + +export const abbreviatedNumberTypeCaster: BushArgumentTypeCaster = (_, phrase): number | null => { + return numeral(phrase?.toLowerCase()).value(); +}; |