@nutandevjoshi/is-even-or-odd-as-a-string

1.0.5 • Public • Published

is-even-or-odd-as-a-string NPM version NPM monthly downloads NPM total downloads

Returns string 'even' if the given number is even else returns 'odd'.

Please consider following this project's author, Pratik Joshi, and consider starring the project to show your ❤️ and support.

Install

Install with npm:

$ npm i @nutandevjoshi/is-even-or-odd-as-a-string

Usage

Works with strings or numbers.

const isEvenOrOdd = require('@nutandevjoshi/is-even-or-odd-as-a-string');

console.log(isEvenOrOdd('1')); //=> odd
console.log(isEvenOrOdd('3')); //=> odd

console.log(isEvenOrOdd(0)); //=> even
console.log(isEvenOrOdd(2)); //=> even

Contributors

Commits Contributor
1 nutandevjoshi

Author

Pratik Joshi

License

Copyright © 2023, Pratik Joshi. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on May 31, 2018.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @nutandevjoshi/is-even-or-odd-as-a-string

      Weekly Downloads

      0

      Version

      1.0.5

      License

      ISC

      Unpacked Size

      3.29 kB

      Total Files

      3

      Last publish

      Collaborators

      • nutandevjoshi