@oriano-dev/is-even
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

isEven v1.0.1 : Check if a number is odd/even.

A lightweight library to test whether a number is odd or even.

Supports various data types such as number, string as well as bigint. All the methods have the proper typing and documentation.

How to use this library ?

  1. Install the library via npm
npm install @oriano-dev/is-even
  1. Import the library in your project
import { isEven } from "@oriano-dev/is-even";
  1. Use the methods anytime in your project
isEven.number(24, "even"); // true
isEven.number(-5, "even"); // false
isEven.string("231", "odd"); // true
isEven.bigint(456257262842n, "even"); // true

Tech behind the library

  • Language used : TypeScript and JavaScript
  • Testing library : Jest
  • Programming paradigm : Object Oriented Programming (OOP)

This library has been released in about 5 hours over 1 morning.

Package Sidebar

Install

npm i @oriano-dev/is-even

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

12 kB

Total Files

12

Last publish

Collaborators

  • oriano-dev