Skip to main content

Determine if a number is odd or even.

This package works with Bun, Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers
JSR Score
100%
Published
a month ago (1.0.3)

is-even

This module contains functions to determine if a number is odd or even.

Examples

Example 1

import { isEven } from '@ebreness/is-even';

isEven(2); // true
isEven(5); // false
isEven("Hello"); // exception is thrown
isNotEven(2); // true
isOdd(3); // true
isNotOdd(27); // false

Add Package

deno add @ebreness/is-even

Import symbol

import * as mod from "@ebreness/is-even";

Add Package

npx jsr add @ebreness/is-even

Import symbol

import * as mod from "@ebreness/is-even";

Add Package

yarn dlx jsr add @ebreness/is-even

Import symbol

import * as mod from "@ebreness/is-even";

Add Package

pnpm dlx jsr add @ebreness/is-even

Import symbol

import * as mod from "@ebreness/is-even";

Add Package

bunx jsr add @ebreness/is-even

Import symbol

import * as mod from "@ebreness/is-even";