Skip to content

Check if a value is a number, including every 'number' type

License

Notifications You must be signed in to change notification settings

nhsz/es6-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

es6-number

NPM

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

About

Check if a value is a number, including every 'number' type

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published