buffer
buffer copied to clipboard
The buffer module from node.js, for the browser.
The `subarray` function should return a `Buffer`, but currently the types are inheriting the definition from `Uint8Array` which has the function returning a `Uint8Array`. I believe PR #261 fixed this...
in the pulgins "buffer", The code below is not work in IE 11. Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) { offset = offset >>> 0 validateNumber(offset, 'offset') const first = this[offset]...
This should atleast avoid the breaking of the IE11 JSParser.
Closes #268 This uses TextDecoder for `toString('utf8')` and `toString()`. I needed to update some tests so that they are in line with Node's native `Buffer` (which also makes them pass...
For example `Buffer.from(Buffer.from([0xE0, 0xAC]).toString())` produces `` with the native Node Buffer while this package currently outputs ``. So it somehow tries to match multiple bytes even if some of them...
ERROR in node_modules/buffer/index.d.ts:23:38 - error TS2304: Cannot find name 'BigInt'. 23 readBigUInt64LE(offset: number): BigInt; ~~~~~~ node_modules/buffer/index.d.ts:24:38 - error TS2304: Cannot find name 'BigInt'. 24 readBigUInt64BE(offset: number): BigInt; ~~~~~~ node_modules/buffer/index.d.ts:30:37 -...
I'm from the group that works on TS --- we ran into a [PR on DT](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/54347) that suspiciously required `ESNext.BigInt`, and it looks like it's required by the types declared...
this is result for error : ``` import { Blob, Buffer } from 'buffer'; ^^^^ SyntaxError: The requested module 'buffer' does not provide an export named 'Blob' ``` need some...
When running it in IE11 I get this error: ```JS SCRIPT5045: Assignment to read-only properties is not allowed in strict mode index.js (1075,1) ``` As a workaround I can remove...