UNPKG

fast-odd-even

Version:

Is this odd or even, but it is *blazingly* fast ⚑

34 lines (20 loc) β€’ 1.04 kB
# ⚑πŸ’ͺ fast-odd-even πŸ’ͺ⚑ Are you tired of having to use separate packages like [is-odd](https://www.npmjs.com/package/is-odd) or [is-even](https://www.npmjs.com/package/is-even) to check, if a number is **odd** or **even**? Are you tired of these 🐌 **slow-performing** 🐌 dependencies? Look no further! This package provides you with separate functionsβ€š `isOdd()` and `isEven()`, which do **exactly** what they say! And it does these things ⚑ **_blazingly fast_** ⚑, by utilizing a πŸ‘½ **special technique** πŸ‘½ called bitwise operations! ## βš™οΈ Installation βš™οΈ You can install this πŸ’« **amazing** πŸ’« tool using our _favourite package manager_ 🀩 **npm** 🀩 ```bash npm install fast-odd-even ``` ## Usage/Examples πŸƒ **Getting started** πŸƒ is easy! ```javascript const { isOdd, isEven } = require("fast-odd-even"); isOdd(5); // true isEven(5); // false ``` ## License This project is πŸ“œ **licensed** πŸ“œ under the πŸ€“ **[MIT](https://choosealicense.com/licenses/mit/)** πŸ€“ license.