Package: effect
Module: Predicate
Checks whether a value is a number.
When to use
Use when you need a Predicate guard to narrow an unknown value to a
number.
Details
Uses typeof input === "number" and does not exclude NaN or Infinity.
Example (Guarding numbers)
import { Predicate } from "effect"
const data: unknown = 42
if (Predicate.isNumber(data)) {
console.log(data + 1)
}
See
isBigIntisStringSignature
declare const isNumber: (input: unknown) => input is number
Since v2.0.0