@codebolt/codeboltjs 1.1.68 → 1.1.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/.codeboltconfig.yaml +0 -0
  2. package/docs/assets/navigation.js +1 -1
  3. package/docs/assets/search.js +1 -1
  4. package/docs/classes/_internal_.Agent.html +43 -39
  5. package/docs/classes/_internal_.ClientRequest.html +57 -57
  6. package/docs/classes/_internal_.Codebolt.html +151 -117
  7. package/docs/classes/_internal_.CustomEventEmitter-1.html +30 -30
  8. package/docs/classes/_internal_.CustomEventEmitter.html +30 -30
  9. package/docs/classes/_internal_.Duplex.html +30 -30
  10. package/docs/classes/_internal_.EventEmitter-1.html +30 -30
  11. package/docs/classes/_internal_.EventEmitter.EventEmitterAsyncResource.html +34 -34
  12. package/docs/classes/_internal_.IncomingMessage.html +57 -55
  13. package/docs/classes/_internal_.KeyObject.html +10 -10
  14. package/docs/classes/_internal_.OutgoingMessage.html +41 -41
  15. package/docs/classes/_internal_.Readable.html +28 -28
  16. package/docs/classes/_internal_.ReadableBase.html +27 -27
  17. package/docs/classes/_internal_.Server-1.html +32 -32
  18. package/docs/classes/_internal_.Server-2.html +24 -24
  19. package/docs/classes/_internal_.Server-3.html +24 -24
  20. package/docs/classes/_internal_.Server.html +42 -42
  21. package/docs/classes/_internal_.ServerResponse.html +50 -50
  22. package/docs/classes/_internal_.Socket.html +28 -28
  23. package/docs/classes/_internal_.Stream.html +28 -28
  24. package/docs/classes/_internal_.TLSSocket.html +29 -29
  25. package/docs/classes/_internal_.URL.html +19 -19
  26. package/docs/classes/_internal_.URLSearchParams.html +15 -15
  27. package/docs/classes/_internal_.WebSocket-1.html +23 -23
  28. package/docs/classes/_internal_.WebSocket.Server.html +23 -23
  29. package/docs/classes/_internal_.Writable.html +24 -24
  30. package/docs/classes/_internal_.WritableBase.html +23 -23
  31. package/docs/classes/_internal_.X509Certificate.html +26 -26
  32. package/docs/classes/_internal_.internal-1.html +29 -29
  33. package/docs/classes/_internal_.internal.PassThrough.html +30 -30
  34. package/docs/classes/_internal_.internal.Transform.html +30 -30
  35. package/docs/enums/_internal_.logType.html +2 -2
  36. package/docs/functions/_internal_.internal.addAbortSignal.html +2 -2
  37. package/docs/functions/_internal_.internal.finished-1.html +1 -1
  38. package/docs/functions/_internal_.internal.pipeline-1.html +1 -1
  39. package/docs/interfaces/_internal_.AgentOptions.html +8 -8
  40. package/docs/interfaces/_internal_.AsymmetricKeyDetails.html +8 -8
  41. package/docs/interfaces/_internal_.Buffer.html +19 -19
  42. package/docs/interfaces/_internal_.CryptoKey.html +5 -5
  43. package/docs/interfaces/_internal_.DuplexOptions.html +1 -1
  44. package/docs/interfaces/_internal_.EventEmitter-2.html +17 -17
  45. package/docs/interfaces/_internal_.EventEmitter.Abortable.html +2 -2
  46. package/docs/interfaces/_internal_.EventEmitter.EventEmitterAsyncResourceOptions.html +2 -2
  47. package/docs/interfaces/_internal_.EventEmitter.EventEmitterReferencingAsyncResource.html +2 -2
  48. package/docs/interfaces/_internal_.ExtractTextResponse.html +3 -0
  49. package/docs/interfaces/_internal_.GetContentResponse.html +3 -0
  50. package/docs/interfaces/_internal_.InformationEvent.html +2 -2
  51. package/docs/interfaces/_internal_.JsonWebKey.html +2 -2
  52. package/docs/interfaces/_internal_.JwkKeyExportOptions.html +2 -2
  53. package/docs/interfaces/_internal_.KeyAlgorithm.html +2 -2
  54. package/docs/interfaces/_internal_.KeyExportOptions.html +2 -2
  55. package/docs/interfaces/_internal_.ListenOptions.html +1 -1
  56. package/docs/interfaces/_internal_.LookupAddress.html +3 -3
  57. package/docs/interfaces/_internal_.LookupOptions.html +12 -5
  58. package/docs/interfaces/_internal_.ReadWriteStream.html +16 -16
  59. package/docs/interfaces/_internal_.ReadableOptions.html +1 -1
  60. package/docs/interfaces/_internal_.ReadableStream-1.html +16 -16
  61. package/docs/interfaces/_internal_.Selection.html +6 -0
  62. package/docs/interfaces/_internal_.ServerOptions.html +7 -8
  63. package/docs/interfaces/_internal_.StaticEventEmitterOptions.html +15 -2
  64. package/docs/interfaces/_internal_.StreamOptions.html +1 -1
  65. package/docs/interfaces/_internal_.UserMessage.html +3 -0
  66. package/docs/interfaces/_internal_.UserRequest.html +7 -0
  67. package/docs/interfaces/_internal_.WebSocket.WebSocket.html +11 -11
  68. package/docs/interfaces/_internal_.WebSocket.WebSocketServer.html +11 -11
  69. package/docs/interfaces/_internal_.WebSocketAlias.html +11 -11
  70. package/docs/interfaces/_internal_.WritableOptions.html +1 -1
  71. package/docs/interfaces/_internal_.WritableStream.html +16 -16
  72. package/docs/interfaces/_internal_.X509CheckOptions.html +6 -6
  73. package/docs/interfaces/_internal_.internal.FinishedOptions.html +1 -1
  74. package/docs/interfaces/_internal_.internal.TransformOptions.html +1 -1
  75. package/docs/modules/_internal_.EventEmitter.html +1 -1
  76. package/docs/modules/_internal_.html +5 -2
  77. package/docs/types/_internal_.AnyRest.html +1 -1
  78. package/docs/types/_internal_.Args.html +1 -1
  79. package/docs/types/_internal_.BinaryLike.html +1 -1
  80. package/docs/types/_internal_.DefaultEventMap.html +1 -1
  81. package/docs/types/_internal_.EventMap.html +1 -1
  82. package/docs/types/_internal_.Key.html +1 -1
  83. package/docs/types/_internal_.Key2.html +1 -1
  84. package/docs/types/_internal_.KeyFormat.html +1 -1
  85. package/docs/types/_internal_.KeyObjectType.html +1 -1
  86. package/docs/types/_internal_.KeyType-1.html +1 -1
  87. package/docs/types/_internal_.KeyType.html +1 -1
  88. package/docs/types/_internal_.KeyUsage.html +1 -1
  89. package/docs/types/_internal_.Listener.html +1 -1
  90. package/docs/types/_internal_.RequestListener.html +1 -1
  91. package/docs/variables/default.html +1 -1
  92. package/index.d.ts +2 -1
  93. package/modules/codeutils.d.ts +1 -1
  94. package/modules/codeutils.js +64 -94
  95. package/modules/project.d.ts +1 -0
  96. package/modules/project.js +14 -0
  97. package/package.json +1 -3
  98. package/src/modules/codeutils.ts +67 -67
  99. package/src/modules/project.ts +14 -0
  100. package/docs/interfaces/_internal_.CommandOutput.html +0 -3
  101. package/docs/interfaces/_internal_.GetJsTreeResponse.html +0 -3
@@ -119,10 +119,10 @@ Comparison is based on the actual sequence of bytes in each <code>Buffer</code>.
119
119
  </ul>
120
120
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;ABC&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;BCD&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf3</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;ABCD&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf3</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf3</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">([</span><span class="hl-7">buf1</span><span class="hl-1">, </span><span class="hl-7">buf2</span><span class="hl-1">, </span><span class="hl-7">buf3</span><span class="hl-1">].</span><span class="hl-0">sort</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-7">compare</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: [ &lt;Buffer 41 42 43&gt;, &lt;Buffer 41 42 43 44&gt;, &lt;Buffer 42 43 44&gt; ]</span><br/><span class="hl-5">// (This result is equal to: [buf1, buf3, buf2].)</span>
121
121
  </code><button>Copy</button></pre>
122
- <p>The optional <code>targetStart</code>, <code>targetEnd</code>, <code>sourceStart</code>, and <code>sourceEnd</code>arguments can be used to limit the comparison to specific ranges within <code>target</code>and <code>buf</code> respectively.</p>
122
+ <p>The optional <code>targetStart</code>, <code>targetEnd</code>, <code>sourceStart</code>, and <code>sourceEnd</code> arguments can be used to limit the comparison to specific ranges within <code>target</code> and <code>buf</code> respectively.</p>
123
123
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">, </span><span class="hl-9">7</span><span class="hl-1">, </span><span class="hl-9">8</span><span class="hl-1">, </span><span class="hl-9">9</span><span class="hl-1">]);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">, </span><span class="hl-9">7</span><span class="hl-1">, </span><span class="hl-9">8</span><span class="hl-1">, </span><span class="hl-9">9</span><span class="hl-1">, </span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-9">9</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1</span>
124
124
  </code><button>Copy</button></pre>
125
- <p><code>ERR_OUT_OF_RANGE</code> is thrown if <code>targetStart &lt; 0</code>, <code>sourceStart &lt; 0</code>,<code>targetEnd &gt; target.byteLength</code>, or <code>sourceEnd &gt; source.byteLength</code>.</p>
125
+ <p><code>ERR_OUT_OF_RANGE</code> is thrown if <code>targetStart &lt; 0</code>, <code>sourceStart &lt; 0</code>, <code>targetEnd &gt; target.byteLength</code>, or <code>sourceEnd &gt; source.byteLength</code>.</p>
126
126
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">target</span>: <span class="tsd-signature-type">Uint8Array</span></span><div class="tsd-comment tsd-typography"><p>A <code>Buffer</code> or Uint8Array with which to compare <code>buf</code>.</p>
127
127
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">targetStart</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The offset within <code>target</code> at which to begin comparison.</p>
128
128
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">targetEnd</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The offset within <code>target</code> at which to end comparison (not inclusive).</p>
@@ -221,7 +221,7 @@ If thisArg is omitted, undefined is used as the this value.</p>
221
221
  <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v5.3.0</p>
222
222
  </div><aside class="tsd-sources"><p>Overrides Uint8Array.includes</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2257</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="indexOf" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>index<wbr/>Of</span><a href="#indexOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="indexOf.indexOf-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">index<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#indexOf.indexOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>If <code>value</code> is:</p>
223
223
  <ul>
224
- <li>a string, <code>value</code> is interpreted according to the character encoding in<code>encoding</code>.</li>
224
+ <li>a string, <code>value</code> is interpreted according to the character encoding in <code>encoding</code>.</li>
225
225
  <li>a <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a>, <code>value</code> will be used in its entirety.
226
226
  To compare a partial <code>Buffer</code>, use <code>buf.subarray</code>.</li>
227
227
  <li>a number, <code>value</code> will be interpreted as an unsigned 8-bit integer
@@ -254,7 +254,7 @@ resulting String. If omitted, the array elements are separated with a comma.</p>
254
254
  rather than the first occurrence.</p>
255
255
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;this buffer is a buffer&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;this&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 17</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: 17</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-9">97</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 15 (97 is the decimal ASCII value for &#39;a&#39;)</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;yolo&#39;</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 5</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -1</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">utf16Buffer</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u039a\u0391\u03a3\u03a3\u0395</span><span class="hl-2">&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;utf16le&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">utf16Buffer</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u03a3</span><span class="hl-2">&#39;</span><span class="hl-1">, </span><span class="hl-3">undefined</span><span class="hl-1">, </span><span class="hl-2">&#39;utf16le&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 6</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">utf16Buffer</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u03a3</span><span class="hl-2">&#39;</span><span class="hl-1">, -</span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-2">&#39;utf16le&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 4</span>
256
256
  </code><button>Copy</button></pre>
257
- <p>If <code>value</code> is not a string, number, or <code>Buffer</code>, this method will throw a<code>TypeError</code>. If <code>value</code> is a number, it will be coerced to a valid byte value,
257
+ <p>If <code>value</code> is not a string, number, or <code>Buffer</code>, this method will throw a <code>TypeError</code>. If <code>value</code> is a number, it will be coerced to a valid byte value,
258
258
  an integer between 0 and 255.</p>
259
259
  <p>If <code>byteOffset</code> is not a number, it will be coerced to a number. Any arguments
260
260
  that coerce to <code>NaN</code>, like <code>{}</code> or <code>undefined</code>, will search the whole buffer.
@@ -349,14 +349,14 @@ values.</p>
349
349
  </code><button>Copy</button></pre>
350
350
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 1</code>.</p>
351
351
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.0</p>
352
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1447</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readIntBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>IntBE</span><a href="#readIntBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readIntBE.readIntBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>IntBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readIntBE.readIntBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code>and interprets the result as a big-endian, two&#39;s complement signed value
352
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1447</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readIntBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>IntBE</span><a href="#readIntBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readIntBE.readIntBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>IntBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readIntBE.readIntBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code> and interprets the result as a big-endian, two&#39;s complement signed value
353
353
  supporting up to 48 bits of accuracy.</p>
354
354
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">, </span><span class="hl-9">0x78</span><span class="hl-1">, </span><span class="hl-9">0x90</span><span class="hl-1">, </span><span class="hl-9">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readIntBE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1234567890ab</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readIntBE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readIntBE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
355
355
  </code><button>Copy</button></pre>
356
356
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
357
357
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to read. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
358
358
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
359
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1304</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readIntLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>IntLE</span><a href="#readIntLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readIntLE.readIntLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>IntLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readIntLE.readIntLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code>and interprets the result as a little-endian, two&#39;s complement signed value
359
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1304</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readIntLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>IntLE</span><a href="#readIntLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readIntLE.readIntLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>IntLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readIntLE.readIntLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code> and interprets the result as a little-endian, two&#39;s complement signed value
360
360
  supporting up to 48 bits of accuracy.</p>
361
361
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">, </span><span class="hl-9">0x78</span><span class="hl-1">, </span><span class="hl-9">0x90</span><span class="hl-1">, </span><span class="hl-9">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readIntLE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -546f87a9cbee</span>
362
362
  </code><button>Copy</button></pre>
@@ -369,7 +369,7 @@ supporting up to 48 bits of accuracy.</p>
369
369
  </code><button>Copy</button></pre>
370
370
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 2</code>.</p>
371
371
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
372
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1375</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUInt16LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUInt16LE</span><a href="#readUInt16LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUInt16LE.readUInt16LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUInt16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUInt16LE.readUInt16LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an unsigned, little-endian 16-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
372
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1375</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUInt16LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUInt16LE</span><a href="#readUInt16LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUInt16LE.readUInt16LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUInt16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUInt16LE.readUInt16LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an unsigned, little-endian 16-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
373
373
  <p>This function is also available under the <code>readUint16LE</code> alias.</p>
374
374
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt16LE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 3412</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt16LE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 5634</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt16LE</span><span class="hl-1">(</span><span class="hl-9">2</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
375
375
  </code><button>Copy</button></pre>
@@ -393,7 +393,7 @@ supporting up to 48 bits of accuracy.</p>
393
393
  </code><button>Copy</button></pre>
394
394
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 1</code>.</p>
395
395
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.0</p>
396
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1325</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUIntBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUIntBE</span><a href="#readUIntBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUIntBE.readUIntBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUIntBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUIntBE.readUIntBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code>and interprets the result as an unsigned big-endian integer supporting
396
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1325</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUIntBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUIntBE</span><a href="#readUIntBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUIntBE.readUIntBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUIntBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUIntBE.readUIntBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code> and interprets the result as an unsigned big-endian integer supporting
397
397
  up to 48 bits of accuracy.</p>
398
398
  <p>This function is also available under the <code>readUintBE</code> alias.</p>
399
399
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">, </span><span class="hl-9">0x78</span><span class="hl-1">, </span><span class="hl-9">0x90</span><span class="hl-1">, </span><span class="hl-9">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUIntBE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1234567890ab</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUIntBE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
@@ -401,7 +401,7 @@ up to 48 bits of accuracy.</p>
401
401
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
402
402
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to read. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
403
403
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
404
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1261</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUIntLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUIntLE</span><a href="#readUIntLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUIntLE.readUIntLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUIntLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUIntLE.readUIntLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code>and interprets the result as an unsigned, little-endian integer supporting
404
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1261</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUIntLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUIntLE</span><a href="#readUIntLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUIntLE.readUIntLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUIntLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUIntLE.readUIntLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code> and interprets the result as an unsigned, little-endian integer supporting
405
405
  up to 48 bits of accuracy.</p>
406
406
  <p>This function is also available under the <code>readUintLE</code> alias.</p>
407
407
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">, </span><span class="hl-9">0x78</span><span class="hl-1">, </span><span class="hl-9">0x90</span><span class="hl-1">, </span><span class="hl-9">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUIntLE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: ab9078563412</span>
@@ -581,7 +581,7 @@ written. However, partially encoded characters will not be written.</p>
581
581
  <h4>Since</h4><p>v14.10.0, v12.19.0</p>
582
582
  </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1030</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeBigUint64LE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Big<wbr/>Uint64LE</span><a href="#writeBigUint64LE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeBigUint64LE-2.writeBigUint64LE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Big<wbr/>Uint64LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeBigUint64LE-2.writeBigUint64LE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">bigint</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Alias</h4><p>Buffer.writeBigUInt64LE</p>
583
583
  <h4>Since</h4><p>v14.10.0, v12.19.0</p>
584
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1056</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeDoubleBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>DoubleBE</span><a href="#writeDoubleBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeDoubleBE.writeDoubleBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>DoubleBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeDoubleBE.writeDoubleBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code>must be a JavaScript number. Behavior is undefined when <code>value</code> is anything
584
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1056</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeDoubleBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>DoubleBE</span><a href="#writeDoubleBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeDoubleBE.writeDoubleBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>DoubleBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeDoubleBE.writeDoubleBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code> must be a JavaScript number. Behavior is undefined when <code>value</code> is anything
585
585
  other than a JavaScript number.</p>
586
586
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">8</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeDoubleBE</span><span class="hl-1">(</span><span class="hl-9">123.456</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 40 5e dd 2f 1a 9f be 77&gt;</span>
587
587
  </code><button>Copy</button></pre>
@@ -589,7 +589,7 @@ other than a JavaScript number.</p>
589
589
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 8</code>.</p>
590
590
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
591
591
  <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
592
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2005</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeDoubleLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>DoubleLE</span><a href="#writeDoubleLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeDoubleLE.writeDoubleLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>DoubleLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeDoubleLE.writeDoubleLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code>must be a JavaScript number. Behavior is undefined when <code>value</code> is anything
592
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2005</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeDoubleLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>DoubleLE</span><a href="#writeDoubleLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeDoubleLE.writeDoubleLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>DoubleLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeDoubleLE.writeDoubleLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code> must be a JavaScript number. Behavior is undefined when <code>value</code> is anything
593
593
  other than a JavaScript number.</p>
594
594
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">8</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeDoubleLE</span><span class="hl-1">(</span><span class="hl-9">123.456</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 77 be 9f 1a 2f dd 5e 40&gt;</span>
595
595
  </code><button>Copy</button></pre>
@@ -613,7 +613,7 @@ undefined when <code>value</code> is anything other than a JavaScript number.</p
613
613
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 4</code>.</p>
614
614
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
615
615
  <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
616
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1945</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt16BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int16BE</span><a href="#writeInt16BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt16BE.writeInt16BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int16BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt16BE.writeInt16BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code>must be a valid signed 16-bit integer. Behavior is undefined when <code>value</code> is
616
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1945</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt16BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int16BE</span><a href="#writeInt16BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt16BE.writeInt16BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int16BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt16BE.writeInt16BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code> must be a valid signed 16-bit integer. Behavior is undefined when <code>value</code> is
617
617
  anything other than a signed 16-bit integer.</p>
618
618
  <p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
619
619
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">2</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeInt16BE</span><span class="hl-1">(</span><span class="hl-9">0x0102</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02&gt;</span>
@@ -622,7 +622,7 @@ anything other than a signed 16-bit integer.</p>
622
622
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 2</code>.</p>
623
623
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
624
624
  <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
625
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1881</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt16LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int16LE</span><a href="#writeInt16LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt16LE.writeInt16LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt16LE.writeInt16LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code>must be a valid signed 16-bit integer. Behavior is undefined when <code>value</code> is
625
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1881</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt16LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int16LE</span><a href="#writeInt16LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt16LE.writeInt16LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt16LE.writeInt16LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code> must be a valid signed 16-bit integer. Behavior is undefined when <code>value</code> is
626
626
  anything other than a signed 16-bit integer.</p>
627
627
  <p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
628
628
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">2</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeInt16LE</span><span class="hl-1">(</span><span class="hl-9">0x0304</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 04 03&gt;</span>
@@ -631,7 +631,7 @@ anything other than a signed 16-bit integer.</p>
631
631
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 2</code>.</p>
632
632
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
633
633
  <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
634
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1859</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt32BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int32BE</span><a href="#writeInt32BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt32BE.writeInt32BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int32BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt32BE.writeInt32BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code>must be a valid signed 32-bit integer. Behavior is undefined when <code>value</code> is
634
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1859</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt32BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int32BE</span><a href="#writeInt32BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt32BE.writeInt32BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int32BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt32BE.writeInt32BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code> must be a valid signed 32-bit integer. Behavior is undefined when <code>value</code> is
635
635
  anything other than a signed 32-bit integer.</p>
636
636
  <p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
637
637
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeInt32BE</span><span class="hl-1">(</span><span class="hl-9">0x01020304</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04&gt;</span>
@@ -640,7 +640,7 @@ anything other than a signed 32-bit integer.</p>
640
640
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 4</code>.</p>
641
641
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
642
642
  <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
643
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1925</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt32LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int32LE</span><a href="#writeInt32LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt32LE.writeInt32LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int32LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt32LE.writeInt32LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code>must be a valid signed 32-bit integer. Behavior is undefined when <code>value</code> is
643
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1925</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt32LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int32LE</span><a href="#writeInt32LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt32LE.writeInt32LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int32LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt32LE.writeInt32LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code> must be a valid signed 32-bit integer. Behavior is undefined when <code>value</code> is
644
644
  anything other than a signed 32-bit integer.</p>
645
645
  <p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
646
646
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeInt32LE</span><span class="hl-1">(</span><span class="hl-9">0x05060708</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 08 07 06 05&gt;</span>
@@ -677,7 +677,7 @@ when <code>value</code> is anything other than a signed integer.</p>
677
677
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to write. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
678
678
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
679
679
  <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
680
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1133</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt16BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt16BE</span><a href="#writeUInt16BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt16BE.writeUInt16BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt16BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt16BE.writeUInt16BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code>must be a valid unsigned 16-bit integer. Behavior is undefined when <code>value</code>is anything other than an
680
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1133</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt16BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt16BE</span><a href="#writeUInt16BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt16BE.writeUInt16BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt16BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt16BE.writeUInt16BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code> must be a valid unsigned 16-bit integer. Behavior is undefined when <code>value</code>is anything other than an
681
681
  unsigned 16-bit integer.</p>
682
682
  <p>This function is also available under the <code>writeUint16BE</code> alias.</p>
683
683
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt16BE</span><span class="hl-1">(</span><span class="hl-9">0xdead</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt16BE</span><span class="hl-1">(</span><span class="hl-9">0xbeef</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer de ad be ef&gt;</span>
@@ -686,7 +686,7 @@ unsigned 16-bit integer.</p>
686
686
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 2</code>.</p>
687
687
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
688
688
  <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
689
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1754</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt16LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt16LE</span><a href="#writeUInt16LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt16LE.writeUInt16LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt16LE.writeUInt16LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code>must be a valid unsigned 16-bit integer. Behavior is undefined when <code>value</code> is
689
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1754</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt16LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt16LE</span><a href="#writeUInt16LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt16LE.writeUInt16LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt16LE.writeUInt16LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code> must be a valid unsigned 16-bit integer. Behavior is undefined when <code>value</code> is
690
690
  anything other than an unsigned 16-bit integer.</p>
691
691
  <p>This function is also available under the <code>writeUint16LE</code> alias.</p>
692
692
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt16LE</span><span class="hl-1">(</span><span class="hl-9">0xdead</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt16LE</span><span class="hl-1">(</span><span class="hl-9">0xbeef</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer ad de ef be&gt;</span>
@@ -695,7 +695,7 @@ anything other than an unsigned 16-bit integer.</p>
695
695
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 2</code>.</p>
696
696
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
697
697
  <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
698
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1726</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt32BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt32BE</span><a href="#writeUInt32BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt32BE.writeUInt32BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt32BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt32BE.writeUInt32BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code>must be a valid unsigned 32-bit integer. Behavior is undefined when <code>value</code>is anything other than an
698
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1726</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt32BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt32BE</span><a href="#writeUInt32BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt32BE.writeUInt32BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt32BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt32BE.writeUInt32BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code> must be a valid unsigned 32-bit integer. Behavior is undefined when <code>value</code>is anything other than an
699
699
  unsigned 32-bit integer.</p>
700
700
  <p>This function is also available under the <code>writeUint32BE</code> alias.</p>
701
701
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt32BE</span><span class="hl-1">(</span><span class="hl-9">0xfeedface</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer fe ed fa ce&gt;</span>
@@ -704,7 +704,7 @@ unsigned 32-bit integer.</p>
704
704
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - 4</code>.</p>
705
705
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
706
706
  <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
707
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1808</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt32LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt32LE</span><a href="#writeUInt32LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt32LE.writeUInt32LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt32LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt32LE.writeUInt32LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code>must be a valid unsigned 32-bit integer. Behavior is undefined when <code>value</code> is
707
+ </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1808</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt32LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt32LE</span><a href="#writeUInt32LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt32LE.writeUInt32LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt32LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt32LE.writeUInt32LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code> must be a valid unsigned 32-bit integer. Behavior is undefined when <code>value</code> is
708
708
  anything other than an unsigned 32-bit integer.</p>
709
709
  <p>This function is also available under the <code>writeUint32LE</code> alias.</p>
710
710
  <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt32LE</span><span class="hl-1">(</span><span class="hl-9">0xfeedface</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer ce fa ed fe&gt;</span>