Returns true if the given number is odd, and is an integer that does not exceed the JavaScript MAXIMUM_SAFE_INTEGER.
Install with npm:
$ npm install --save is-odd-num
Works with strings or numbers.
const isOdd = require('is-odd-num');
console.log(isOdd('1')); //=> true
console.log(isOdd('3')); //=> true
console.log(isOdd(0)); //=> false
console.log(isOdd(2)); //=> false
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running Tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Released under the MIT License.