isnumber
A simple test to see if a value is a non-infinite number.
Last updated 7 years ago by bryce .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install isnumber 
SYNC missed versions from official npm registry.

isNumber

NPM

isNumber is a super tiny module that provides a test to see if a value is a finite number.

By super tiny, I mean like a single line -- however, I tend to use this somewhat frequently, so module it is!

var isNumber = require("isnumber")

isNumber(13) // true
isNumber("1241.12") // true
isNumber(0xff) // true

isNumber(Infinity) // false
isNumber("cat") // false
isNumber({foo: "bar"}) // false

LICENSE

MIT

Current Tags

  • 1.0.0                                ...           latest (7 years ago)

1 Versions

  • 1.0.0                                ...           7 years ago

Copyright 2014 - 2016 © taobao.org |