buffer icon indicating copy to clipboard operation
buffer copied to clipboard

The buffer module from node.js, for the browser.

Results 70 buffer issues
Sort by recently updated
recently updated
newest added

``` // Node: const buffer = Buffer.from(base64url, 'base64url'); // works! ``` ``` // Buffer: const buffer = Buffer.from(base64url, 'base64url'); // TypeError: Unknown encoding: base64url ```

Using string replaceAll since base64 is external base64-js. Dependency does not yet support base64url beatgammit/base64-js#53

In NodeJS, the behavior of Buffer.from(x, 'hex') differed slightly on its handling of bad hex parsing. My fix also increased performance. I tried parsing a hex string `'7c'.repeat(5e7)` and it...

Not sure if this is a temporary issue or if bundle.run is offline forever, but the link to the standalone version at https://bundle.run/buffer is no longer working.

Fix type declarations for `bigint` based functions

`[1,2,3].slice(1,3)` return ` [2, 3]`, it's ok. `Array.from( Buffer.from([1,2,3]).slice(1,3) )` return `[2,3]`, it's ok. `Array.from( Buffer.from([1,2,3]).slice(1,Math.pow(2,32)) )` return `[]` , it's wrong result. In node `Buffer`, there is comment: `...

I've recently switched to this library on a @ionic/vue app and since then some of my unit tests fail since they run under node environment. The following is an example...

add missing kStringMaxLength, constants.MAX_LENGTH & constants.MAX_STRING_LENGTH fixes #311

There appears to be a missing implementation of `buffer.constants.MAX_LENGTH` & `buffer.constants.MAX_STRING_LENGTH` that is documented in the [node buffer api](https://nodejs.org/docs/latest-v14.x/api/buffer.html#buffer_buffer_constants)

My project is working fine, but when I build project, occur 'Attempted import error: 'Buffer' is not exported from 'buffer' (imported as 'Buffer').'