Check if a value is a number, including every
'number'
type
$ npm install --save es6-number
const isNumber = require('es6-number')
console.log(isNumber(-1))
// => true
console.log(isNumber(0))
// => true
console.log(isNumber(1))
// => true
console.log(isNumber('123'))
// => false
console.log(isNumber(Infinity))
// => true
console.log(isNumber(-Infinity))
// => true
console.log(isNumber(NaN))
// => false
console.log(isNumber(null))
// => false
MIT © Nicolás Quiroz