Skip to main content

isNumber

Checks if value is classified as a Number primitive or object.

API

function isNumber(value: unknown): value is number;

Usage

import { isNumber } from '@feedzai/js-utilities';

isNumber(3)
// true

isNumber(Number.MIN_VALUE)
// true

isNumber(Infinity)
// true

isNumber('3')
// false