We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Can't convert to Base64 beacuse in Alphabet in B64 contains symbols that can't pass the condition /^.$|[+-.\s]|(.).*\1/ giving
/^.$|[+-.\s]|(.).*\1/
Uncaught Error: [BigNumber Error] ALPHABET invalid: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ at _.config._.set (bignumber.min.js:2:6185)
Any workaround?
The text was updated successfully, but these errors were encountered:
It would just be a matter of replacing the characters. For example:
BigNumber.set({ ALPHABET: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_' }); const bigNumberToBase64 = big => big.toString(64). replace(/\$/g, '+').replace(/_/g, '-'); const bigNumberFromBase64 = str => new BigNumber( str.replace(/\+/g, '$').replace(/\-/g, '_'), 64); console.log( bigNumberToBase64(bigNumberFromBase64('+123abcZ+--')) ); // '+123abcZ+--'
Sorry, something went wrong.
No branches or pull requests
Can't convert to Base64 beacuse in Alphabet in B64 contains symbols that can't pass the condition
/^.$|[+-.\s]|(.).*\1/
givingAny workaround?
The text was updated successfully, but these errors were encountered: