You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So this issue could be "ported over" from numeral adamwdraper/Numeral-js#778 as it is still relevant and would be a welcome improvement.
I've also noticed that to get BigInt support it is possible to revert to older versions of numbro, but it is broken from 1.10.x and later, unless the expected implementation has changed.
The latest version I could find that is working is 1.9.3. See the code below with links for a very simple example.
import numbro from "numbro";
const value = BigInt(1000);
const testBigInt = numbro(value);
const elem = document.getElementById("app");
elem?.append(`${testBigInt.value()}`);
So this issue could be "ported over" from numeral adamwdraper/Numeral-js#778 as it is still relevant and would be a welcome improvement.
I've also noticed that to get BigInt support it is possible to revert to older versions of numbro, but it is broken from 1.10.x and later, unless the expected implementation has changed.
The latest version I could find that is working is 1.9.3. See the code below with links for a very simple example.
1.9.3 example - working
https://codesandbox.io/p/sandbox/working-bigint-w6wgvr
1.10.0 example - broken with
Invalid input
errorhttps://codesandbox.io/p/sandbox/broken-bigint-1-10-f6ny9f
2.4.0 example - broken with
Cannot convert a BigInt value to a number
error (still using legacy Old Format in example)https://codesandbox.io/p/sandbox/broken-bigint-ttwsz4
The text was updated successfully, but these errors were encountered: