diff options
Diffstat (limited to 'shared/core-utils')
-rw-r--r-- | shared/core-utils/common/index.ts | 1 | ||||
-rw-r--r-- | shared/core-utils/common/number.ts | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/shared/core-utils/common/index.ts b/shared/core-utils/common/index.ts index 720977ead..8d63ee1b2 100644 --- a/shared/core-utils/common/index.ts +++ b/shared/core-utils/common/index.ts | |||
@@ -2,6 +2,7 @@ export * from './array' | |||
2 | export * from './random' | 2 | export * from './random' |
3 | export * from './date' | 3 | export * from './date' |
4 | export * from './env' | 4 | export * from './env' |
5 | export * from './number' | ||
5 | export * from './object' | 6 | export * from './object' |
6 | export * from './path' | 7 | export * from './path' |
7 | export * from './regexp' | 8 | export * from './regexp' |
diff --git a/shared/core-utils/common/number.ts b/shared/core-utils/common/number.ts new file mode 100644 index 000000000..9a96dcf5c --- /dev/null +++ b/shared/core-utils/common/number.ts | |||
@@ -0,0 +1,7 @@ | |||
1 | function forceNumber (value: any) { | ||
2 | return parseInt(value + '') | ||
3 | } | ||
4 | |||
5 | export { | ||
6 | forceNumber | ||
7 | } | ||