Files
Nim/nimcache/runnableExamples/jsutils_examples_1.nim
github-actions[bot] ef3d9e7b38 Deploy to GitHub pages
2025-12-28 15:55:52 +00:00

15 lines
504 B
Nim

#[
autogenerated by docgen
loc: /home/runner/work/Nim/Nim/lib/std/private/jsutils.nim(27, 5)
rdoccmd:
]#
import std/assertions
import "/home/runner/work/Nim/Nim/lib/std/private/jsutils.nim"
{.line: ("/home/runner/work/Nim/Nim/lib/std/private/jsutils.nim", 27, 5).}:
import std/[jsffi, jsbigints]
assert jsTypeOf(1.toJs) == "number"
assert jsTypeOf(false.toJs) == "boolean"
assert [1].toJs.jsTypeOf == "object" # note the difference with `getProtoName`
assert big"1".toJs.jsTypeOf == "bigint"