Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/rimbu/typical/num.ts>IsEven

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
type alias IsEven
import { type IsEven } from "https://deno.land/x/rimbu@1.0.2/typical/num.ts";

Returns true if the given natural number is even, or never otherwise.

Examples

Example 1

Even<4> => true
Even<11> => false
Even<-3> => never

Type Parameters

N extends number
definition: StrNum.IsEven<StrNum.FromNumber<N>>