is-number-even-or-odd

1.0.2 • Public • Published

is-number-even-or-odd

You may or may not want to use it :)


List of Features

  • Check if the number is even or not
  • Check if the number is odd or not
  • Check if the number is even or odd

Download & Installation

$ npm i is-number-even-or-odd

Example Usage

const {isEven,isOdd,isEvenOrOdd} = require("is-number-even-or-odd")

// isEven -> returns true or false
const test1 = isEven(2)
// isOdd -> returns true or false
const test2 = isOdd(2)
// isEvenOrOdd -> returns "even", "odd" or "error"
const test3 = isEvenOrOdd(3)
const test4 = isEvenOrOdd('a')

console.log(test1) // true
console.log(test2) // false
console.log(test3) // odd
console.log(test4) // error

License

This project is licensed under the MIT License

Package Sidebar

Install

npm i is-number-even-or-odd

Weekly Downloads

4,862

Version

1.0.2

License

MIT

Unpacked Size

1.74 kB

Total Files

4

Last publish

Collaborators

  • comboishere