indutny / bn.js

BigNum in pure javascript
MIT License
1.19k stars 150 forks source link

Add method for "not equal" #278

Open fvictorio opened 3 years ago

fvictorio commented 3 years ago

As far as I can tell, there isn't a method for checking if two BN instances are different. Of course, you can do !x.eq(y), but since there is already a lot of redundancy with the .eq, .lt, .lte, .gt and .gte methods, it seems reasonable to me to add a .ne (or whatever the name) function?

(Sorry if this has been discussed before! I looked for it but couldn't find anything).