aboutsummaryrefslogtreecommitdiff
path: root/node_modules/is-number
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/is-number')
-rw-r--r--node_modules/is-number/LICENSE21
-rw-r--r--node_modules/is-number/README.md115
-rw-r--r--node_modules/is-number/index.js22
-rw-r--r--node_modules/is-number/package.json83
4 files changed, 241 insertions, 0 deletions
diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE
new file mode 100644
index 00000000..842218cf
--- /dev/null
+++ b/node_modules/is-number/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2016, Jon Schlinkert
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/is-number/README.md b/node_modules/is-number/README.md
new file mode 100644
index 00000000..281165dc
--- /dev/null
+++ b/node_modules/is-number/README.md
@@ -0,0 +1,115 @@
+# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-number)
+
+> Returns true if the value is a number. comprehensive tests.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save is-number
+```
+
+## Usage
+
+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).
+
+```js
+var isNumber = require('is-number');
+```
+
+### true
+
+See the [tests](./test.js) for more examples.
+
+```js
+isNumber(5e3) //=> 'true'
+isNumber(0xff) //=> 'true'
+isNumber(-1.1) //=> 'true'
+isNumber(0) //=> 'true'
+isNumber(1) //=> 'true'
+isNumber(1.1) //=> 'true'
+isNumber(10) //=> 'true'
+isNumber(10.10) //=> 'true'
+isNumber(100) //=> 'true'
+isNumber('-1.1') //=> 'true'
+isNumber('0') //=> 'true'
+isNumber('012') //=> 'true'
+isNumber('0xff') //=> 'true'
+isNumber('1') //=> 'true'
+isNumber('1.1') //=> 'true'
+isNumber('10') //=> 'true'
+isNumber('10.10') //=> 'true'
+isNumber('100') //=> 'true'
+isNumber('5e3') //=> 'true'
+isNumber(parseInt('012')) //=> 'true'
+isNumber(parseFloat('012')) //=> 'true'
+```
+
+### False
+
+See the [tests](./test.js) for more examples.
+
+```js
+isNumber('foo') //=> 'false'
+isNumber([1]) //=> 'false'
+isNumber([]) //=> 'false'
+isNumber(function () {}) //=> 'false'
+isNumber(Infinity) //=> 'false'
+isNumber(NaN) //=> 'false'
+isNumber(new Array('abc')) //=> 'false'
+isNumber(new Array(2)) //=> 'false'
+isNumber(new Buffer('abc')) //=> 'false'
+isNumber(null) //=> 'false'
+isNumber(undefined) //=> 'false'
+isNumber({abc: 'abc'}) //=> 'false'
+```
+
+## About
+
+### Related projects
+
+* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even "Get the even numbered items from an array.")
+* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.")
+* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd "Returns true if the given number is odd.")
+* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ")
+* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
+* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](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](../../issues/new).
+
+### Building docs
+
+_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
+
+To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
+
+```sh
+$ npm install -g verb verb-generate-readme && verb
+```
+
+### Running tests
+
+Install dev dependencies:
+
+```sh
+$ npm install -d && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT license](https://github.com/jonschlinkert/is-number/blob/master/LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on September 10, 2016._ \ No newline at end of file
diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js
new file mode 100644
index 00000000..7a2a45be
--- /dev/null
+++ b/node_modules/is-number/index.js
@@ -0,0 +1,22 @@
+/*!
+ * is-number <https://github.com/jonschlinkert/is-number>
+ *
+ * Copyright (c) 2014-2015, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */
+
+'use strict';
+
+var typeOf = require('kind-of');
+
+module.exports = function isNumber(num) {
+ var type = typeOf(num);
+
+ if (type === 'string') {
+ if (!num.trim()) return false;
+ } else if (type !== 'number') {
+ return false;
+ }
+
+ return (num - num + 1) >= 0;
+};
diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json
new file mode 100644
index 00000000..8c1f9ab4
--- /dev/null
+++ b/node_modules/is-number/package.json
@@ -0,0 +1,83 @@
+{
+ "name": "is-number",
+ "description": "Returns true if the value is a number. comprehensive tests.",
+ "version": "3.0.0",
+ "homepage": "https://github.com/jonschlinkert/is-number",
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "contributors": [
+ "Charlike Mike Reagent (http://www.tunnckocore.tk)",
+ "Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)"
+ ],
+ "repository": "jonschlinkert/is-number",
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/is-number/issues"
+ },
+ "license": "MIT",
+ "files": [
+ "index.js"
+ ],
+ "main": "index.js",
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "dependencies": {
+ "kind-of": "^3.0.2"
+ },
+ "devDependencies": {
+ "benchmarked": "^0.2.5",
+ "chalk": "^1.1.3",
+ "gulp-format-md": "^0.1.10",
+ "mocha": "^3.0.2"
+ },
+ "keywords": [
+ "check",
+ "coerce",
+ "coercion",
+ "integer",
+ "is",
+ "is-nan",
+ "is-num",
+ "is-number",
+ "istype",
+ "kind",
+ "math",
+ "nan",
+ "num",
+ "number",
+ "numeric",
+ "test",
+ "type",
+ "typeof",
+ "value"
+ ],
+ "verb": {
+ "related": {
+ "list": [
+ "even",
+ "is-even",
+ "is-odd",
+ "is-primitive",
+ "kind-of",
+ "odd"
+ ]
+ },
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "lint": {
+ "reflinks": true
+ },
+ "reflinks": [
+ "verb",
+ "verb-generate-readme"
+ ]
+ }
+} \ No newline at end of file