diff options
author | flywind <xzsflywind@gmail.com> | 2021-03-09 19:22:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-09 12:22:26 +0100 |
commit | cc37fee0ab744e035510498024e4fee016560ab8 (patch) | |
tree | 9d291606511375153811e2c6139aec41b66ce80e /lib/std | |
parent | 9c5223a5f5589d4e2bb0808aa2d8e6c5bcd8204d (diff) | |
download | Nim-cc37fee0ab744e035510498024e4fee016560ab8.tar.gz |
fix #17275 (#17276)
Diffstat (limited to 'lib/std')
-rw-r--r-- | lib/std/private/jsutils.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/private/jsutils.nim b/lib/std/private/jsutils.nim index b858e150e..cf58b3b81 100644 --- a/lib/std/private/jsutils.nim +++ b/lib/std/private/jsutils.nim @@ -37,3 +37,7 @@ when defined(js): asm """`result` = typeof BigUint64Array != 'undefined'""" proc getProtoName*[T](a: T): cstring {.importjs: "Object.prototype.toString.call(#)".} + + proc isInteger*[T](x: T): bool {.importjs: "Number.isInteger(#)".} + + proc isSafeInteger*[T](x: T): bool {.importjs: "Number.isSafeInteger(#)".} |