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

readBigUInt64BE() and similar methods are missing #244

Closed
nazar-pc opened this issue Sep 10, 2019 · 9 comments
Closed

readBigUInt64BE() and similar methods are missing #244

nazar-pc opened this issue Sep 10, 2019 · 9 comments

Comments

@nazar-pc
Copy link

Essentially getting this in Browserify build:

TypeError: Buffer.from(...).readBigUInt64BE is not a function

@feross
Copy link
Owner

feross commented Sep 10, 2019

According to Node docs this was added in Node 12.0.0 so it makes sense that it's missing from here.

@nazar-pc
Copy link
Author

Yes, but v12 is out for a while now, so I think it is time to consider implementing new methods.

@feross
Copy link
Owner

feross commented Sep 10, 2019

I'd love to do it, but I'm very time-constrained at the moment. PR welcome, from you or anyone else!

@fanatid
Copy link
Contributor

fanatid commented Sep 12, 2019

Node.js internally uses BigInt constructor, if this package will start use it... should this methods be available if BigInt is not available in environment?
I'm not familiar too much with bundling systems, can usage of BigInt cause any issues with it?

@feross
Copy link
Owner

feross commented Sep 12, 2019

@fanatid I like this approach. It should be possible to detect the existence of BigInt and make the methods throw if it's not available.

BigInt availability is already quite good (70%) and only improving. And this is certainly better than not supporting it at all. Want to send a PR?

@fanatid
Copy link
Contributor

fanatid commented Sep 12, 2019

Yep, I'd like to try, but little busy now. If I'll start work on this I'll left comment (probably on next week).

@fanatid
Copy link
Contributor

fanatid commented Sep 17, 2019

Just checked how this implemented in node. I think better finish #217 first. @feross are you ok with this?
For reference, PR in node: nodejs/node#19691

@feross
Copy link
Owner

feross commented Sep 18, 2019

Yep, feel free to tackle this in any order your prefer. Finishing #217 first sounds good. Thanks for all your help, @fanatid.

@feross
Copy link
Owner

feross commented Nov 4, 2020

Released as 6.0.0

@feross feross closed this as completed Nov 4, 2020
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

3 participants