Returns true
if the given object
is a Number
. Otherwise, returns false
.
const util = require('util');
util.isNumber(false);
// Returns: false
util.isNumber(Infinity);
// Returns: true
util.isNumber(0);
// Returns: true
util.isNumber(NaN);
// Returns: true
Since v4.0.0 - Use typeof value === 'number'
instead.
Generated using TypeDoc
Returns
true
if the givenobject
is aNumber
. Otherwise, returnsfalse
.Deprecated
Since v4.0.0 - Use
typeof value === 'number'
instead.