Comparing version 1.1.2 to 2.0.0
@@ -11,5 +11,4 @@ /*! | ||
module.exports = function isNumber(n) { | ||
return (!!(+n) && !Array.isArray(n)) && isFinite(n) | ||
|| n === '0' | ||
|| n === 0; | ||
return n !== null && !Array.isArray(n) | ||
&& ((+n) - (+n) + 1) >= 0; | ||
}; |
{ | ||
"name": "is-number", | ||
"description": "Returns true if the value is a number. comprehensive tests.", | ||
"version": "1.1.2", | ||
"version": "2.0.0", | ||
"homepage": "https://github.com/jonschlinkert/is-number", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -1,8 +0,7 @@ | ||
# is-number [![NPM version](https://badge.fury.io/js/is-number.svg)](http://badge.fury.io/js/is-number) [![Build Status](https://travis-ci.org/jonschlinkert/is-number.svg)](https://travis-ci.org/jonschlinkert/is-number) | ||
# is-number [![NPM version](https://badge.fury.io/js/is-number.svg)](http://badge.fury.io/js/is-number) [![Build Status](https://travis-ci.org/jonschlinkert/is-number.svg)](https://travis-ci.org/jonschlinkert/is-number) | ||
> Returns true if the value is a number. comprehensive tests. | ||
To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist][gist]. | ||
To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). | ||
## Install with [npm](npmjs.org) | ||
@@ -14,3 +13,2 @@ | ||
## Usage | ||
@@ -70,16 +68,18 @@ | ||
## Other projects | ||
* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. | ||
* [is-primitive](https://github.com/jonschlinkert/is-primitive): Returns `true` if the value is a primitive. | ||
* [even](https://github.com/jonschlinkert/even): Get the even numbered items from an array. | ||
* [odd](https://github.com/jonschlinkert/odd): Get the odd numbered items from an array. | ||
* [is-primitive](https://github.com/jonschlinkert/is-primitive): Returns `true` if the value is a primitive. | ||
* [is-even](https://github.com/jonschlinkert/is-even): Return true if the given number is even. | ||
* [is-odd](https://github.com/jonschlinkert/is-odd): Returns true if the given number is odd. | ||
* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. | ||
* [odd](https://github.com/jonschlinkert/odd): Get the odd numbered items from an array. | ||
## Contributing | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-number/issues) | ||
## Run tests | ||
Install dev dependencies. | ||
Install dev dependencies: | ||
```bash | ||
@@ -89,19 +89,16 @@ npm i -d && npm test | ||
## Author | ||
**Jon Schlinkert** | ||
+ [github/jonschlinkert](https://github.com/jonschlinkert) | ||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) | ||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) | ||
## License | ||
Copyright (c) 2015 Jon Schlinkert | ||
Released under the MIT license | ||
Copyright (c) 2015 Jon Schlinkert | ||
Released under the MIT license. | ||
*** | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 05, 2015._ | ||
[infinity]: http://en.wikipedia.org/wiki/Infinity | ||
[gist]: https://gist.github.com/jonschlinkert/e30c70c713da325d0e81 | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 02, 2015._ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5512
11
102