| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c810ff2 commit 1878a25
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1512,7 +1512,7 @@ a `Buffer` is that in this case one needs to specify the `byteOffset` correctly: | |||
| 1512 | 1512 | import { Buffer } from 'buffer'; | |
| 1513 | 1513 | ||
| 1514 | 1514 | // Create a buffer smaller than `Buffer.poolSize`. | |
| 1515 | - const nodeBuffer = new Buffer.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); | ||
| 1515 | + const nodeBuffer = Buffer.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); | ||
| 1516 | 1516 | ||
| 1517 | 1517 | // When casting the Node.js Buffer to an Int8Array, use the byteOffset | |
| 1518 | 1518 | // to refer only to the part of `nodeBuffer.buffer` that contains the memory | |
@@ -1524,7 +1524,7 @@ new Int8Array(nodeBuffer.buffer, nodeBuffer.byteOffset, nodeBuffer.length); | |||
| 1524 | 1524 | const { Buffer } = require('buffer'); | |
| 1525 | 1525 | ||
| 1526 | 1526 | // Create a buffer smaller than `Buffer.poolSize`. | |
| 1527 | - const nodeBuffer = new Buffer.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); | ||
| 1527 | + const nodeBuffer = Buffer.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); | ||
| 1528 | 1528 | ||
| 1529 | 1529 | // When casting the Node.js Buffer to an Int8Array, use the byteOffset | |
| 1530 | 1530 | // to refer only to the part of `nodeBuffer.buffer` that contains the memory | |
| Back | FazBrowse Home | New Git URL |
0 commit comments