UNPKG

@ealch/oddyssey

Version:

A tiny TypeScript library to check if a number is odd or even — your journey into parity begins here.

6 lines (5 loc) 104 B
const t = (s) => Math.abs(s % 2) === 1, n = (s) => s % 2 === 0; export { n as isEven, t as isOdd };