@m0n0lab/is-odd
v5.1.4
Published
[](https://www.npmjs.com/package/@m0n0lab/is-odd) [](https://codecov.io/gh/pabloimrik17/monolab?flag=is-odd
Downloads
390
Readme
@m0n0lab/is-odd
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-oddpnpm
pnpm add @m0n0lab/is-oddJSR
npx jsr add @m0n0lab/is-oddUsage
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)); // falseAPI
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
