Skip to content

isNumber

Test if a value is a number.

Usage

js
import { isNumber } from '@studiometa/js-toolkit/utils';

isNumber(10); // true
isNumber('foo'); // false

Parameters

  • value (any): the value to test

Return value

Returns true if the given value is a number, false otherwise.

MIT Licensed