-
Notifications
You must be signed in to change notification settings - Fork 152
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
modn API inconsistency #112
Comments
I'm fine with fixing it, but let's postpone it until next major release. |
When do you plan a new major release? Should this live in a branch until then? Or shouldn't we have a branch called |
Hm... I'm not sure about it yet. Do you think there is some urgency in handling this particular issue? Or do you have any other plans in mind? |
Don't know, there could be a couple of things made more clear, etc.
|
According to https://github.com/indutny/bn.js#postfixes, any method ending with |
@jprichardson this is not exactly true. |
@indutny Gahhh. Haha, it says "argument" right there - sorry I missed that. |
All the arithmetic methods return a BN except |
I can't really think about anything other than |
All mod/div methods return a BN instance, except
modn
which returns a JS Number.I think it would make sense making the current
modn
internal (prefixing it with _) so thattoString
can keep using it the fastest way, and creating a newmodn
which returns a BN instance.divmod
already encapsulates amodn
result as a BN instance so it should use the new method.Comments?
The text was updated successfully, but these errors were encountered: