{"action":"created","issue":{"url":"https://api.github.com/repos/indutny/bn.js/issues/112","repository_url":"https://api.github.com/repos/indutny/bn.js","labels_url":"https://api.github.com/repos/indutny/bn.js/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/indutny/bn.js/issues/112/comments","events_url":"https://api.github.com/repos/indutny/bn.js/issues/112/events","html_url":"https://github.com/indutny/bn.js/issues/112","id":128662771,"number":112,"title":"modn API inconsistency","user":{"login":"axic","id":20340,"avatar_url":"https://avatars.githubusercontent.com/u/20340?v=3","gravatar_id":"","url":"https://api.github.com/users/axic","html_url":"https://github.com/axic","followers_url":"https://api.github.com/users/axic/followers","following_url":"https://api.github.com/users/axic/following{/other_user}","gists_url":"https://api.github.com/users/axic/gists{/gist_id}","starred_url":"https://api.github.com/users/axic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axic/subscriptions","organizations_url":"https://api.github.com/users/axic/orgs","repos_url":"https://api.github.com/users/axic/repos","events_url":"https://api.github.com/users/axic/events{/privacy}","received_events_url":"https://api.github.com/users/axic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/indutny/bn.js/labels/semver-major","name":"semver-major","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-25T22:45:11Z","updated_at":"2016-02-22T19:12:32Z","closed_at":null,"body":"All mod/div methods return a BN instance, except `modn` which returns a JS Number.\r\n\r\nI think it would make sense making the current `modn` internal (prefixing it with _) so that `toString` can keep using it the fastest way, and creating a new `modn` which returns a BN instance.\r\n\r\n`divmod` already encapsulates a `modn` result as a BN instance so it should use the new method.\r\n\r\nComments?"},"comment":{"url":"https://api.github.com/repos/indutny/bn.js/issues/comments/187325238","html_url":"https://github.com/indutny/bn.js/issues/112#issuecomment-187325238","issue_url":"https://api.github.com/repos/indutny/bn.js/issues/112","id":187325238,"user":{"login":"jprichardson","id":150063,"avatar_url":"https://avatars.githubusercontent.com/u/150063?v=3","gravatar_id":"","url":"https://api.github.com/users/jprichardson","html_url":"https://github.com/jprichardson","followers_url":"https://api.github.com/users/jprichardson/followers","following_url":"https://api.github.com/users/jprichardson/following{/other_user}","gists_url":"https://api.github.com/users/jprichardson/gists{/gist_id}","starred_url":"https://api.github.com/users/jprichardson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jprichardson/subscriptions","organizations_url":"https://api.github.com/users/jprichardson/orgs","repos_url":"https://api.github.com/users/jprichardson/repos","events_url":"https://api.github.com/users/jprichardson/events{/privacy}","received_events_url":"https://api.github.com/users/jprichardson/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T19:12:32Z","updated_at":"2016-02-22T19:12:32Z","body":"> n - which means that the argument of the function must be a plain JavaScript number\r\n\r\n@indutny Gahhh. Haha, it says \"argument\" right there - sorry I missed that. "}}