From a2855b66ae554e1d23760484c6f4e16387a1ee07 Mon Sep 17 00:00:00 2001 From: flywind <43030857+xflywind@users.noreply.github.com> Date: Mon, 1 Feb 2021 06:19:25 -0600 Subject: JS: make hash float support IE/Safari (#16872) --- lib/std/private/jsutils.nim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/std/private') 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'""" -- cgit 1.4.1-2-gfad0