-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Support BigInt in idToChunks, idToPath and pathToId #163
Comments
@tshemsedinov There is no problem with actual functions but, as I said earlier, eslint currently does not support BigInt:
as well as metatests:
though BigInt.prototype.toString() does
so CI tests will fail in any case. |
Also we can temporary use BigInt.prototype.toJSON = function(){return this.toString()+'n'} to stringify BigInt:
and JSON.parse('{"a": "123n"}', (key, value) => {
if(typeof value === 'string' && value.lastIndexOf('n') === value.length - 1) {
let i;
for(i = 0; i < value.length - 1; i++) {
if (value[i] !== '0' &&
value[i] !== '1' &&
value[i] !== '2' &&
value[i] !== '3' &&
value[i] !== '4' &&
value[i] !== '5' &&
value[i] !== '6' &&
value[i] !== '7' &&
value[i] !== '8' &&
value[i] !== '9') return value;
}
return BigInt(value.slice(0, value.length - 1));
}
return value;
}) to parse it:
@tshemsedinov what do you think of that? |
Do we still need it? And what about |
BigInt
supported, use functions version that support itRefs: #147
The text was updated successfully, but these errors were encountered: