sidorares / dbus-native

D-bus protocol client and server for node.js written in native javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[proposal] Replace Long.js with native BigInt

acrisci opened this issue · comments

BigInt is a native way to represent 64 bit integers (dbus type x) in node.

Available since version 10.8.0.

https://node.green/#ESNEXT-candidate--stage-3--BigInt

https://developers.google.com/web/updates/2018/05/bigint

Do you see any issues with that?

I was thinking about it, but might be a bit too early?
Maybe OK to go with migger api changes ( async/await etc ) in major version.

I created a PR #252 with a potential interim solution to at least present the option of marshalling/unmarshalling BigInts when the feature is available. Over time it would probably make sense to shift towards the native type.