diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2021-02-01 06:19:25 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 13:19:25 +0100 |
commit | a2855b66ae554e1d23760484c6f4e16387a1ee07 (patch) | |
tree | 076d7719c6e5599567f415798d1bd910fc76c86f /lib/std/private | |
parent | 206ad43cdcd8fddff9fbcdc51937632944c5119a (diff) | |
download | Nim-a2855b66ae554e1d23760484c6f4e16387a1ee07.tar.gz |
JS: make hash float support IE/Safari (#16872)
Diffstat (limited to 'lib/std/private')
-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 296533a49..47a6caa2b 100644 --- a/lib/std/private/jsutils.nim +++ b/lib/std/private/jsutils.nim @@ -16,5 +16,9 @@ when defined(js): func `[]`*(arr: BigUint64Array, i: int): JsBigInt {.importjs: "#[#]".} func `[]=`*(arr: Float64Array, i: int, v: float) {.importjs: "#[#] = #".} + proc hasJsBigInt*(): bool = asm """`result` = typeof BigInt != 'undefined'""" + + proc hasBigUint64Array*(): bool = + asm """`result` = typeof BigUint64Array != 'undefined'""" |