Returns the remainder of dividing two integers.
Please consider following this project's author, Nicholas DeHart, and consider starring the project to show your ❤️ and support.
Install with npm:
$ npm install --save remainder
Works with strings or numbers.
const remainder = require("remainder");
console.log(remainder("4", "2")); //=> 0
console.log(remainder("2", "4")); //=> 2
console.log(remainder(4, 2)); //=> 0
console.log(remainder(2, 4)); //=> 2
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Nicholas DeHart
Copyright © 2020, Nicholas DeHart. Released under the MIT License.