# num-is-even-or-odd

> Verify if a number is even or odd

Latest version **2.0.2** (published 2023-12-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install num-is-even-or-odd
pnpm add num-is-even-or-odd
yarn add num-is-even-or-odd
bun add num-is-even-or-odd
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2023-12-20 |
| First published | 2022-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Otavio Rampinelli |
| Maintainers | otarampinelli |
| Keywords | array, count, filter, string, is, math, numeric, odd, even, integer |

## Links

- npm: https://www.npmjs.com/package/num-is-even-or-odd
- Homepage: https://github.com/otarampinelli/num-is-even-or-odd
- npm.io page: https://npm.io/package/num-is-even-or-odd

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2023-12-20
- 2.0.1 — 2023-12-20
- 2.0.0 — 2023-12-20
- 1.0.6 — 2022-04-29
- 1.0.5 — 2022-03-24
- 1.0.4 — 2022-03-23
- 1.0.3 — 2022-03-22
- 1.0.2 — 2022-03-22
- 1.0.1 — 2022-03-22
- 1.0.0 — 2022-03-22

## README

# num-is-even-or-odd [![NPM version](https://img.shields.io/npm/v/num-is-even-or-odd.svg?style=flat)](https://www.npmjs.com/package/num-is-even-or-odd) [![NPM monthly downloads](https://img.shields.io/npm/dm/num-is-even-or-odd.svg?style=flat)](https://npmjs.org/package/num-is-even-or-odd) [![NPM total downloads](https://img.shields.io/npm/dt/num-is-even-or-odd.svg?style=flat)](https://npmjs.org/package/num-is-even-or-odd)

> Return even or odd to as result to a given number.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install -D num-is-even-or-odd
```

## Usage
```js
import { evenOrOdd } from 'num-is-even-or-odd'

const { isEvenOrOdd, isEven, isOdd } = evenOrOdd()

// Method to verify even and odd

console.log(isEvenOrOdd(3)); //=> "odd"
console.log(isEvenOrOdd(4)); //=> "even"

// You can pass a "returnAsBool" boolean parameter to return results as boolean, true to even and false to odd, default value for parameter is false

console.log(isEvenOrOdd(3, true)); //=> false (odd)
console.log(isEvenOrOdd(4, true)); //=> true (even)

// Method to verify if the value is odd

console.log(isOdd(3)); //=> true
console.log(isOdd(4)); //=> false

// Method to verify if the value is even

console.log(isEven(3)); //=> false
console.log(isEven(4)); //=> true

```

### Author

**Otavio Rampinelli**

* [LinkedIn Profile](https://linkedin.com/in/otarampinelli)
* [GitHub Profile](https://github.com/otarampinelli)

### License

Copyright © 2023, [Otavio Rampinelli](https://github.com/otarampinelli).
Released under the [MIT License](LICENSE).

***

---
_Source: https://npm.io/package/num-is-even-or-odd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
