Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: io.js 3.0 - Node.js 5.3 typed array support #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChALkeR
Copy link
Contributor

@ChALkeR ChALkeR commented Nov 20, 2024

  1. Between io.js 3.0 and Node.js 5.3, typed arrays are supported, but Buffer(ab, offset, length) wasn't. So add a recheck for that case.
  2. Between io.js 3.0 and Node.js 4.4, this also hit Buffers, as they are not passing fast-path instanceof check there
    Which was a regression in [Fix] return valid values on multi-byte-wide TypedArray input #23
  3. Between Node.js 5.0 and 6.3.0, Buffer(new Uint8Array(0).buffer) fails on empty buffers, add a hack for that
  4. Also refactor code a bit

Refs: browserify/hash-base#19

@ljharb
Copy link
Member

ljharb commented Nov 25, 2024

LGTM after some added tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants