Files
Nim/jsutils.html
github-actions[bot] de413ab6bb Deploy to GitHub pages
2025-12-25 20:14:24 +00:00

532 lines
49 KiB
HTML

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>std/private/jsutils</title>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
<!-- JS -->
<script type="text/javascript" src="dochack.js?v=2.3.1"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">std/private/jsutils</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple-boot">
<li><a href="manual.html">Manual</a></li>
<li><a href="lib.html">Standard library</a></li>
<li> <a id="indexLink" href="theindex.html">Index</a></li>
<li><a href="compiler/theindex.html">Compiler docs</a></li>
<li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
<li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput"
oninput="search()" />
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#ArrayBuffer" title="ArrayBuffer = ref object of JsRoot">ArrayBuffer</a></li>
<li><a class="reference" href="#BigUint64Array" title="BigUint64Array = ref object of JsRoot">BigUint64Array</a></li>
<li><a class="reference" href="#Float64Array" title="Float64Array = ref object of JsRoot">Float64Array</a></li>
<li><a class="reference" href="#Uint8Array" title="Uint8Array = ref object of JsRoot">Uint8Array</a></li>
<li><a class="reference" href="#Uint32Array" title="Uint32Array = ref object of JsRoot">Uint32Array</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#10" id="60">Consts</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#hasWorkingInt64" title="hasWorkingInt64 = true">hasWorkingInt64</a></li>
<li><a class="reference" href="#jsNoBigInt64" title="jsNoBigInt64 = false">jsNoBigInt64</a></li>
<li><a class="reference" href="#maxSafeInteger" title="maxSafeInteger = 9007199254740991'i64">maxSafeInteger</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">[]
<li><a class="reference" href="#%5B%5D%2CBigUint64Array%2Cint" title="`[]`(arr: BigUint64Array; i: int): JsBigInt">`[]`(arr: BigUint64Array; i: int): JsBigInt</a></li>
<li><a class="reference" href="#%5B%5D%2CUint8Array%2Cint" title="`[]`(arr: Uint8Array; i: int): uint8">`[]`(arr: Uint8Array; i: int): uint8</a></li>
<li><a class="reference" href="#%5B%5D%2CUint32Array%2Cint" title="`[]`(arr: Uint32Array; i: int): uint32">`[]`(arr: Uint32Array; i: int): uint32</a></li>
</ul>
<ul class="simple nested-toc-section">[]=
<li><a class="reference" href="#%5B%5D%3D%2CFloat64Array%2Cint%2Cfloat" title="`[]=`(arr: Float64Array; i: int; v: float)">`[]=`(arr: Float64Array; i: int; v: float)</a></li>
</ul>
<ul class="simple nested-toc-section">getProtoName
<li><a class="reference" href="#getProtoName%2CT" title="getProtoName[T](a: T): cstring">getProtoName[T](a: T): cstring</a></li>
</ul>
<ul class="simple nested-toc-section">hasBigUint64Array
<li><a class="reference" href="#hasBigUint64Array" title="hasBigUint64Array(): bool">hasBigUint64Array(): bool</a></li>
</ul>
<ul class="simple nested-toc-section">hasJsBigInt
<li><a class="reference" href="#hasJsBigInt" title="hasJsBigInt(): bool">hasJsBigInt(): bool</a></li>
</ul>
<ul class="simple nested-toc-section">isInteger
<li><a class="reference" href="#isInteger%2CT" title="isInteger[T](x: T): bool">isInteger[T](x: T): bool</a></li>
</ul>
<ul class="simple nested-toc-section">isSafeInteger
<li><a class="reference" href="#isSafeInteger%2CT" title="isSafeInteger[T](x: T): bool">isSafeInteger[T](x: T): bool</a></li>
</ul>
<ul class="simple nested-toc-section">jsConstructorName
<li><a class="reference" href="#jsConstructorName%2CT" title="jsConstructorName[T](a: T): cstring">jsConstructorName[T](a: T): cstring</a></li>
</ul>
<ul class="simple nested-toc-section">jsTypeOf
<li><a class="reference" href="#jsTypeOf%2CT" title="jsTypeOf[T](x: T): cstring">jsTypeOf[T](x: T): cstring</a></li>
</ul>
<ul class="simple nested-toc-section">newArrayBuffer
<li><a class="reference" href="#newArrayBuffer%2Cint" title="newArrayBuffer(n: int): ArrayBuffer">newArrayBuffer(n: int): ArrayBuffer</a></li>
</ul>
<ul class="simple nested-toc-section">newBigUint64Array
<li><a class="reference" href="#newBigUint64Array%2CArrayBuffer" title="newBigUint64Array(buffer: ArrayBuffer): BigUint64Array">newBigUint64Array(buffer: ArrayBuffer): BigUint64Array</a></li>
</ul>
<ul class="simple nested-toc-section">newFloat64Array
<li><a class="reference" href="#newFloat64Array%2CArrayBuffer" title="newFloat64Array(buffer: ArrayBuffer): Float64Array">newFloat64Array(buffer: ArrayBuffer): Float64Array</a></li>
</ul>
<ul class="simple nested-toc-section">newUint8Array
<li><a class="reference" href="#newUint8Array%2Cint" title="newUint8Array(n: int): Uint8Array">newUint8Array(n: int): Uint8Array</a></li>
</ul>
<ul class="simple nested-toc-section">newUint32Array
<li><a class="reference" href="#newUint32Array%2CArrayBuffer" title="newUint32Array(buffer: ArrayBuffer): Uint32Array">newUint32Array(buffer: ArrayBuffer): Uint32Array</a></li>
</ul>
</ul>
</details>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">
<p><strong class="examples_text">Example:</strong></p>
<pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Identifier">private</span><span class="Operator">/</span><span class="Identifier">jsutils</span>
<span class="Keyword">let</span> <span class="Identifier">a</span> <span class="Punctuation">{</span><span class="Operator">.</span><span class="Identifier">importjs</span><span class="Punctuation">:</span> <span class="StringLit">&quot;Number.MAX_SAFE_INTEGER&quot;</span><span class="Operator">.</span><span class="Punctuation">}</span><span class="Punctuation">:</span> <span class="Identifier">int64</span>
<span class="Identifier">assert</span> <span class="Identifier">a</span> <span class="Operator">==</span> <span class="Identifier">maxSafeInteger</span></pre></p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="jsbigints.html">jsbigints</a>
</dl>
</div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="ArrayBuffer">
<dt><pre><a href="jsutils.html#ArrayBuffer"><span class="Identifier">ArrayBuffer</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="system.html#JsRoot"><span class="Identifier">JsRoot</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L5" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L5" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="BigUint64Array">
<dt><pre><a href="jsutils.html#BigUint64Array"><span class="Identifier">BigUint64Array</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="system.html#JsRoot"><span class="Identifier">JsRoot</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L9" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L9" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="Float64Array">
<dt><pre><a href="jsutils.html#Float64Array"><span class="Identifier">Float64Array</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="system.html#JsRoot"><span class="Identifier">JsRoot</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L6" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L6" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="Uint8Array">
<dt><pre><a href="jsutils.html#Uint8Array"><span class="Identifier">Uint8Array</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="system.html#JsRoot"><span class="Identifier">JsRoot</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L8" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L8" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="Uint32Array">
<dt><pre><a href="jsutils.html#Uint32Array"><span class="Identifier">Uint32Array</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="system.html#JsRoot"><span class="Identifier">JsRoot</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L7" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L7" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="10">
<h1><a class="toc-backref" href="#10">Consts</a></h1>
<dl class="item">
<div id="hasWorkingInt64">
<dt><pre><a href="jsutils.html#hasWorkingInt64"><span class="Identifier">hasWorkingInt64</span></a> <span class="Other">=</span> <span class="DecNumber">true</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L95" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L95" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="jsNoBigInt64">
<dt><pre><a href="jsutils.html#jsNoBigInt64"><span class="Identifier">jsNoBigInt64</span></a> <span class="Other">=</span> <span class="DecNumber">false</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L86" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L86" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="maxSafeInteger">
<dt><pre><a href="jsutils.html#maxSafeInteger"><span class="Identifier">maxSafeInteger</span></a> <span class="Other">=</span> <span class="DecNumber">9007199254740991'i64</span></pre></dt>
<dd>
The same as <tt class="docutils literal"><span class="pre"><span class="Identifier">Number</span><span class="Operator">.</span><span class="Identifier">MAX_SAFE_INTEGER</span></span></tt> or <tt class="docutils literal"><span class="pre"><span class="DecNumber">2</span><span class="Operator">^</span><span class="DecNumber">53</span> <span class="Operator">-</span> <span class="DecNumber">1</span></span></tt>. See <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER</a>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L61" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L61" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="[]-procs-all">
<div id="[],BigUint64Array,int">
<dt><pre><span class="Keyword">func</span> <a href="#%5B%5D%2CBigUint64Array%2Cint"><span class="Identifier">`[]`</span></a><span class="Other">(</span><span class="Identifier">arr</span><span class="Other">:</span> <a href="jsutils.html#BigUint64Array"><span class="Identifier">BigUint64Array</span></a><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">)</span><span class="Other">:</span> <a href="jsbigints.html#JsBigInt"><span class="Identifier">JsBigInt</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;#[#]&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L21" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L21" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="[],Uint8Array,int">
<dt><pre><span class="Keyword">func</span> <a href="#%5B%5D%2CUint8Array%2Cint"><span class="Identifier">`[]`</span></a><span class="Other">(</span><span class="Identifier">arr</span><span class="Other">:</span> <a href="jsutils.html#Uint8Array"><span class="Identifier">Uint8Array</span></a><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#uint8"><span class="Identifier">uint8</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;#[#]&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L20" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L20" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="[],Uint32Array,int">
<dt><pre><span class="Keyword">func</span> <a href="#%5B%5D%2CUint32Array%2Cint"><span class="Identifier">`[]`</span></a><span class="Other">(</span><span class="Identifier">arr</span><span class="Other">:</span> <a href="jsutils.html#Uint32Array"><span class="Identifier">Uint32Array</span></a><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#uint32"><span class="Identifier">uint32</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;#[#]&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L19" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L19" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="[]=-procs-all">
<div id="[]=,Float64Array,int,float">
<dt><pre><span class="Keyword">func</span> <a href="#%5B%5D%3D%2CFloat64Array%2Cint%2Cfloat"><span class="Identifier">`[]=`</span></a><span class="Other">(</span><span class="Identifier">arr</span><span class="Other">:</span> <a href="jsutils.html#Float64Array"><span class="Identifier">Float64Array</span></a><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">;</span> <span class="Identifier">v</span><span class="Other">:</span> <a href="system.html#float"><span class="Identifier">float</span></a><span class="Other">)</span> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;#[#] = #&quot;</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L22" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L22" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getProtoName-procs-all">
<div id="getProtoName,T">
<dt><pre><span class="Keyword">proc</span> <a href="#getProtoName%2CT"><span class="Identifier">getProtoName</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;Object.prototype.toString.call(#)&quot;</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<p><strong class="examples_text">Example:</strong></p>
<pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Punctuation">[</span><span class="Identifier">jsffi</span><span class="Punctuation">,</span> <span class="Identifier">jsbigints</span><span class="Punctuation">]</span>
<span class="Keyword">type</span> <span class="Identifier">A</span> <span class="Operator">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span>
<span class="Identifier">assert</span> <span class="FloatNumber">1.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">getProtoName</span> <span class="Operator">==</span> <span class="StringLit">&quot;[object Number]&quot;</span>
<span class="Identifier">assert</span> <span class="StringLit">&quot;a&quot;</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">getProtoName</span> <span class="Operator">==</span> <span class="StringLit">&quot;[object String]&quot;</span>
<span class="Identifier">assert</span> <span class="RawData">big&quot;1&quot;</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">getProtoName</span> <span class="Operator">==</span> <span class="StringLit">&quot;[object BigInt]&quot;</span>
<span class="Identifier">assert</span> <span class="Identifier">false</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">getProtoName</span> <span class="Operator">==</span> <span class="StringLit">&quot;[object Boolean]&quot;</span>
<span class="Identifier">assert</span> <span class="Punctuation">(</span><span class="Identifier">a</span><span class="Punctuation">:</span> <span class="DecNumber">1</span><span class="Punctuation">)</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">getProtoName</span> <span class="Operator">==</span> <span class="StringLit">&quot;[object Object]&quot;</span>
<span class="Identifier">assert</span> <span class="Identifier">A</span><span class="Operator">.</span><span class="Identifier">default</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">getProtoName</span> <span class="Operator">==</span> <span class="StringLit">&quot;[object Null]&quot;</span>
<span class="Identifier">assert</span> <span class="Punctuation">[</span><span class="DecNumber">1</span><span class="Punctuation">]</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">getProtoName</span> <span class="Operator">==</span> <span class="StringLit">&quot;[object Int32Array]&quot;</span> <span class="Comment"># implementation defined</span>
<span class="Identifier">assert</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="DecNumber">1</span><span class="Punctuation">]</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">getProtoName</span> <span class="Operator">==</span> <span class="StringLit">&quot;[object Array]&quot;</span> <span class="Comment"># ditto</span></pre>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L48" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L48" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="hasBigUint64Array-procs-all">
<div id="hasBigUint64Array">
<dt><pre><span class="Keyword">proc</span> <a href="#hasBigUint64Array"><span class="Identifier">hasBigUint64Array</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L45" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L45" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="hasJsBigInt-procs-all">
<div id="hasJsBigInt">
<dt><pre><span class="Keyword">proc</span> <a href="#hasJsBigInt"><span class="Identifier">hasJsBigInt</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L42" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L42" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="isInteger-procs-all">
<div id="isInteger,T">
<dt><pre><span class="Keyword">proc</span> <a href="#isInteger%2CT"><span class="Identifier">isInteger</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;Number.isInteger(#)&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<p><strong class="examples_text">Example:</strong></p>
<pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Identifier">jsffi</span>
<span class="Identifier">assert</span> <span class="FloatNumber">1.</span><span class="Identifier">isInteger</span>
<span class="Identifier">assert</span> <span class="Keyword">not</span> <span class="FloatNumber">1.5</span><span class="Operator">.</span><span class="Identifier">isInteger</span>
<span class="Identifier">assert</span> <span class="FloatNumber">1.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">isInteger</span>
<span class="Identifier">assert</span> <span class="Keyword">not</span> <span class="FloatNumber">1.5</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">isInteger</span></pre>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L68" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L68" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="isSafeInteger-procs-all">
<div id="isSafeInteger,T">
<dt><pre><span class="Keyword">proc</span> <a href="#isSafeInteger%2CT"><span class="Identifier">isSafeInteger</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;Number.isSafeInteger(#)&quot;</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<p><strong class="examples_text">Example:</strong></p>
<pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Identifier">jsffi</span>
<span class="Identifier">assert</span> <span class="Keyword">not</span> <span class="StringLit">&quot;123&quot;</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">isSafeInteger</span>
<span class="Identifier">assert</span> <span class="FloatNumber">123.</span><span class="Identifier">isSafeInteger</span>
<span class="Identifier">assert</span> <span class="FloatNumber">123.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">isSafeInteger</span>
<span class="Keyword">when</span> <span class="Identifier">false</span><span class="Punctuation">:</span>
<span class="Identifier">assert</span> <span class="FloatNumber">9007199254740991.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">isSafeInteger</span>
<span class="Identifier">assert</span> <span class="Keyword">not</span> <span class="FloatNumber">9007199254740992.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">isSafeInteger</span></pre>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L76" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L76" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="jsConstructorName-procs-all">
<div id="jsConstructorName,T">
<dt><pre><span class="Keyword">proc</span> <a href="#jsConstructorName%2CT"><span class="Identifier">jsConstructorName</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a></pre></dt>
<dd>
<p><strong class="examples_text">Example:</strong></p>
<pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Identifier">jsffi</span>
<span class="Keyword">let</span> <span class="Identifier">a</span> <span class="Operator">=</span> <span class="Identifier">array</span><span class="Punctuation">[</span><span class="DecNumber">2</span><span class="Punctuation">,</span> <span class="Identifier">float64</span><span class="Punctuation">]</span><span class="Operator">.</span><span class="Identifier">default</span>
<span class="Identifier">assert</span> <span class="Identifier">jsConstructorName</span><span class="Punctuation">(</span><span class="Identifier">a</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="StringLit">&quot;Float64Array&quot;</span>
<span class="Identifier">assert</span> <span class="Identifier">jsConstructorName</span><span class="Punctuation">(</span><span class="Identifier">a</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="StringLit">&quot;Float64Array&quot;</span></pre>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L34" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L34" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="jsTypeOf-procs-all">
<div id="jsTypeOf,T">
<dt><pre><span class="Keyword">proc</span> <a href="#jsTypeOf%2CT"><span class="Identifier">jsTypeOf</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;typeof(#)&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns the name of the JsObject's JavaScript type as a cstring.
<p><strong class="examples_text">Example:</strong></p>
<pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Punctuation">[</span><span class="Identifier">jsffi</span><span class="Punctuation">,</span> <span class="Identifier">jsbigints</span><span class="Punctuation">]</span>
<span class="Identifier">assert</span> <span class="Identifier">jsTypeOf</span><span class="Punctuation">(</span><span class="FloatNumber">1.</span><span class="Identifier">toJs</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="StringLit">&quot;number&quot;</span>
<span class="Identifier">assert</span> <span class="Identifier">jsTypeOf</span><span class="Punctuation">(</span><span class="Identifier">false</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="StringLit">&quot;boolean&quot;</span>
<span class="Identifier">assert</span> <span class="Punctuation">[</span><span class="DecNumber">1</span><span class="Punctuation">]</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">jsTypeOf</span> <span class="Operator">==</span> <span class="StringLit">&quot;object&quot;</span> <span class="Comment"># note the difference with `getProtoName`</span>
<span class="Identifier">assert</span> <span class="RawData">big&quot;1&quot;</span><span class="Operator">.</span><span class="Identifier">toJs</span><span class="Operator">.</span><span class="Identifier">jsTypeOf</span> <span class="Operator">==</span> <span class="StringLit">&quot;bigint&quot;</span></pre>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L24" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L24" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="newArrayBuffer-procs-all">
<div id="newArrayBuffer,int">
<dt><pre><span class="Keyword">func</span> <a href="#newArrayBuffer%2Cint"><span class="Identifier">newArrayBuffer</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">)</span><span class="Other">:</span> <a href="jsutils.html#ArrayBuffer"><span class="Identifier">ArrayBuffer</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;new ArrayBuffer(#)&quot;</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L12" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L12" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="newBigUint64Array-procs-all">
<div id="newBigUint64Array,ArrayBuffer">
<dt><pre><span class="Keyword">func</span> <a href="#newBigUint64Array%2CArrayBuffer"><span class="Identifier">newBigUint64Array</span></a><span class="Other">(</span><span class="Identifier">buffer</span><span class="Other">:</span> <a href="jsutils.html#ArrayBuffer"><span class="Identifier">ArrayBuffer</span></a><span class="Other">)</span><span class="Other">:</span> <a href="jsutils.html#BigUint64Array"><span class="Identifier">BigUint64Array</span></a> {.
<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;new BigUint64Array(#)&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L15" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L15" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="newFloat64Array-procs-all">
<div id="newFloat64Array,ArrayBuffer">
<dt><pre><span class="Keyword">func</span> <a href="#newFloat64Array%2CArrayBuffer"><span class="Identifier">newFloat64Array</span></a><span class="Other">(</span><span class="Identifier">buffer</span><span class="Other">:</span> <a href="jsutils.html#ArrayBuffer"><span class="Identifier">ArrayBuffer</span></a><span class="Other">)</span><span class="Other">:</span> <a href="jsutils.html#Float64Array"><span class="Identifier">Float64Array</span></a> {.
<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;new Float64Array(#)&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L13" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L13" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="newUint8Array-procs-all">
<div id="newUint8Array,int">
<dt><pre><span class="Keyword">func</span> <a href="#newUint8Array%2Cint"><span class="Identifier">newUint8Array</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">)</span><span class="Other">:</span> <a href="jsutils.html#Uint8Array"><span class="Identifier">Uint8Array</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;new Uint8Array(#)&quot;</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L17" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L17" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="newUint32Array-procs-all">
<div id="newUint32Array,ArrayBuffer">
<dt><pre><span class="Keyword">func</span> <a href="#newUint32Array%2CArrayBuffer"><span class="Identifier">newUint32Array</span></a><span class="Other">(</span><span class="Identifier">buffer</span><span class="Other">:</span> <a href="jsutils.html#ArrayBuffer"><span class="Identifier">ArrayBuffer</span></a><span class="Other">)</span><span class="Other">:</span> <a href="jsutils.html#Uint32Array"><span class="Identifier">Uint32Array</span></a> {.
<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">&quot;new Uint32Array(#)&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/private/jsutils.nim#L14" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/private/jsutils.nim#L14" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2025-12-25 20:13:59 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
</body>
</html>