isNumberRaw
Returns true
if the given object
is a Number
. Otherwise, returns false
.
const util = require('node:util');
util.isNumber(false);
// Returns: false
util.isNumber(Infinity);
// Returns: true
util.isNumber(0);
// Returns: true
util.isNumber(NaN);
// Returns: true
Content copied to clipboard
Since
v0.11.5