From 3e845f120fa1bb0f38e54969238a4d27abad7098 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 3 Sep 2021 11:11:00 -0400 Subject: add setxp command --- src/arguments/abbreviatedNumber.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/arguments/abbreviatedNumber.ts (limited to 'src/arguments') 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(); +}; -- cgit