es6-number
v0.0.2
Published
Check if a value is a number, including every 'number' type
Downloads
8
Maintainers
Readme
es6-number
Check if a value is a number, including every
'number'
type
Install
$ npm install --save es6-number
Usage
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
License
MIT © Nicolás Quiroz