Skip to main content
Home

Built and signed on GitHub Actions

It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
88%
Published
a month ago (5.1.4)

@m0n0lab/is-odd

npm version is-odd coverage is-odd bundle

A simple, well-tested utility to check if a number is odd. Perfect for number validation, mathematical operations, conditional logic, and filtering.

Features

  • ๐ŸŽฏ Simple and intuitive API
  • โœ… Fully typed with TypeScript
  • ๐Ÿงช 100% test coverage
  • ๐Ÿ“ฆ Zero dependencies
  • โšก Lightweight and fast
  • ๐Ÿ”’ Secure and reliable
  • ๐Ÿš€ Production ready
  • ๐Ÿ“˜ Well documented

Installation

npm

npm install @m0n0lab/is-odd

pnpm

pnpm add @m0n0lab/is-odd

JSR

npx jsr add @m0n0lab/is-odd

Usage

import { isOdd, isNotOdd } from "@m0n0lab/is-odd";

// Check if a number is odd
console.log(isOdd(3)); // true
console.log(isOdd(2)); // false

// Check if a number is not odd (even)
console.log(isNotOdd(2)); // true
console.log(isNotOdd(3)); // false

API

isOdd(value: number): boolean

Returns true if the number is odd, false otherwise.

isNotOdd(value: number): boolean

Returns true if the number is not odd (i.e., even), false otherwise.

License

MIT

Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@m0n0lab/is-odd

Import symbol

import * as is_odd from "@m0n0lab/is-odd";
or

Import directly with a jsr specifier

import * as is_odd from "jsr:@m0n0lab/is-odd";

Add Package

pnpm i jsr:@m0n0lab/is-odd
or (using pnpm 10.8 or older)
pnpm dlx jsr add @m0n0lab/is-odd

Import symbol

import * as is_odd from "@m0n0lab/is-odd";

Add Package

yarn add jsr:@m0n0lab/is-odd
or (using Yarn 4.8 or older)
yarn dlx jsr add @m0n0lab/is-odd

Import symbol

import * as is_odd from "@m0n0lab/is-odd";

Add Package

vlt install jsr:@m0n0lab/is-odd

Import symbol

import * as is_odd from "@m0n0lab/is-odd";

Add Package

npx jsr add @m0n0lab/is-odd

Import symbol

import * as is_odd from "@m0n0lab/is-odd";

Add Package

bunx jsr add @m0n0lab/is-odd

Import symbol

import * as is_odd from "@m0n0lab/is-odd";