kawanet / msgpack-lite

Fast Pure JavaScript MessagePack Encoder and Decoder / msgpack.org[JavaScript]
https://www.npmjs.com/package/msgpack-lite
MIT License
987 stars 127 forks source link

BigInt / BigInt64Array / BigUInt64Array #95

Open kawanet opened 5 years ago

kawanet commented 5 years ago

Node.js supports BigInt BigInt64Array BigUInt64Array which are proposed at stage 3 at TC39.

$ node -e 'console.log(typeof 1n)'
bigint

$ node -e 'console.log("" + 9007199254740993)'
9007199254740992

$ node -e 'console.log("" + 9007199254740993n)'
9007199254740993

We currently have int64 option to decode msgpack's (u)int64 with int64-buffer object.

var codec = msgpack.createCodec({int64: true});

Features:

thith commented 5 years ago

@kawanet what is the state of bigint support?

MeirionHughes commented 4 years ago

this is level 4 now.