hildjj / node-cbor

Encode and decode CBOR documents, with both easy mode, streaming mode, and SAX-style evented mode.
MIT License
358 stars 73 forks source link

Add BigInt support #80

Closed hildjj closed 6 years ago

hildjj commented 6 years ago

Node 10.7 implements BigInt

hildjj commented 6 years ago

I'd like someone else to review this if possible, please.

cbettinger commented 2 years ago

Is there any way to tell cbor to use BigNumber again on platforms that do not support BigInt?

hildjj commented 2 years ago

No. There are a few options you could take:

hildjj commented 2 years ago

@cbettinger see how one person solved it here: https://github.com/Path-Check/universal-verifier-app/blob/dd41eaf8c2b3f927541112ec71a65ca14cc2424d/index.js

cbettinger commented 2 years ago

Thank you very much for your research!

hildjj commented 2 years ago

@cbettinger I've added a cbor-rn-prereqs package that should a) make this easier for others, and b) ensure the code we came up with is tested. I updated https://github.com/hildjj/node-cbor-expo-example to use it. See https://github.com/hildjj/node-cbor/tree/main/packages/cbor-rn-prereqs for details.