diff options
Diffstat (limited to 'src/sjs.mjs')
| -rw-r--r-- | src/sjs.mjs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sjs.mjs b/src/sjs.mjs index 0b2c705..2c9d551 100644 --- a/src/sjs.mjs +++ b/src/sjs.mjs @@ -1,6 +1,10 @@ export const max = (a, b) => a > b ? a : b; export const min = (a, b) => a < b ? a : b; +export const isNumeric = c => + c.charCodeAt(0) >= "0".charCodeAt(0) && + c.charCodeAt(0) <= "9".charCodeAt(0); + export const explode = s => s.split(""); export const getIn = (obj, path) => |
