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

Add support for typed arrays #72

Closed
Firescar96 opened this issue Aug 17, 2018 · 4 comments
Closed

Add support for typed arrays #72

Firescar96 opened this issue Aug 17, 2018 · 4 comments

Comments

@Firescar96
Copy link

Firescar96 commented Aug 17, 2018

I didn't see a mention of typed arrays in the shims. For a react-native project I'm working on I added
support for the polyfills from typedarray to the shims.js file generated by rn-nodeify.

This fixed an error I got importing blake2b

@Firescar96
Copy link
Author

Scratch that, it didn't completely fix the error since typedarray doesn't completely support ArrayBuffer. Do you know of a polyfill that does?

@mvayngrib
Copy link
Member

@Firescar96 as far as i know, typed arrays are supported natively in most recent ios and android versions, and you shouldn't have to do anything special to add support for them. What error are you hitting?

@Firescar96
Copy link
Author

I got an error on this line that parameter_block is undefined. Above parameter_block is defined as Uint8Array

@mvayngrib
Copy link
Member

interesting, but it's unlikely new Uint8Array would return null if they were unsupported. More likely it would crash. Can you add some print statements and check that the line you linked definitely runs second?

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

No branches or pull requests

2 participants