first commit
This commit is contained in:
1
build/node_modules/is-integer/.npmignore
generated
vendored
Normal file
1
build/node_modules/is-integer/.npmignore
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/node_modules/
|
||||
8
build/node_modules/is-integer/.travis.yml
generated
vendored
Normal file
8
build/node_modules/is-integer/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.8"
|
||||
- "0.10"
|
||||
- "0.12"
|
||||
- "iojs"
|
||||
before_install:
|
||||
- npm install -g npm
|
||||
10
build/node_modules/is-integer/LICENSE
generated
vendored
Normal file
10
build/node_modules/is-integer/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
34
build/node_modules/is-integer/LICENSE.md
generated
vendored
Normal file
34
build/node_modules/is-integer/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
This project is licensed under the [WTFPL][] and [ISC][] licenses.
|
||||
|
||||
[WTFPL]: https://en.wikipedia.org/wiki/WTFPL
|
||||
[ISC]: https://opensource.org/licenses/ISC
|
||||
|
||||
## WTFPL
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar \<sam@hocevar.net>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified copies
|
||||
of this license document, and changing it is allowed as long as the name
|
||||
is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR
|
||||
COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
|
||||
## ISC
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
31
build/node_modules/is-integer/README.md
generated
vendored
Normal file
31
build/node_modules/is-integer/README.md
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# is-integer [](http://travis-ci.org/parshap/js-is-integer)
|
||||
|
||||
ES2015 (ES6) [`Number.isInteger`][isInteger] polyfill implemented in
|
||||
ES3.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var isInteger = require("is-integer");
|
||||
isInteger("hello") // -> false
|
||||
isInteger(4) // -> true
|
||||
isInteger(4.0) // -> true
|
||||
isInteger(4.1) // -> false
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `var isInteger = require("is-integer")`
|
||||
|
||||
> Determines whether the provided value is an integer.
|
||||
|
||||
See [`Number.isInteger`][isInteger].
|
||||
|
||||
[isInteger]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger "Number.isInteger - MDN Documentation"
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install is-integer
|
||||
```
|
||||
|
||||
8
build/node_modules/is-integer/index.js
generated
vendored
Normal file
8
build/node_modules/is-integer/index.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// https://github.com/paulmillr/es6-shim
|
||||
// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger
|
||||
var isFinite = require("is-finite");
|
||||
module.exports = Number.isInteger || function(val) {
|
||||
return typeof val === "number" &&
|
||||
isFinite(val) &&
|
||||
Math.floor(val) === val;
|
||||
};
|
||||
59
build/node_modules/is-integer/package.json
generated
vendored
Normal file
59
build/node_modules/is-integer/package.json
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"_from": "is-integer@^1.0.3",
|
||||
"_id": "is-integer@1.0.7",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-a96Bqs3feLZZtmKdYpytxRqIbVw=",
|
||||
"_location": "/is-integer",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "is-integer@^1.0.3",
|
||||
"name": "is-integer",
|
||||
"escapedName": "is-integer",
|
||||
"rawSpec": "^1.0.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/pngout-bin/strip-dirs"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.7.tgz",
|
||||
"_shasum": "6bde81aacddf78b659b6629d629cadc51a886d5c",
|
||||
"_spec": "is-integer@^1.0.3",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build/node_modules/pngout-bin/node_modules/strip-dirs",
|
||||
"author": {
|
||||
"name": "Parsha Pourkhomami"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/parshap/js-is-integer/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"is-finite": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "ES2015 (ES6) Number.isInteger polyfill",
|
||||
"devDependencies": {
|
||||
"tape": "^3.5.0"
|
||||
},
|
||||
"homepage": "https://github.com/parshap/js-is-integer#readme",
|
||||
"keywords": [
|
||||
"es2015",
|
||||
"es6",
|
||||
"Number",
|
||||
"isInteger",
|
||||
"polyfill"
|
||||
],
|
||||
"license": "WTFPL OR ISC",
|
||||
"main": "index.js",
|
||||
"name": "is-integer",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/parshap/js-is-integer.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.0.7"
|
||||
}
|
||||
72
build/node_modules/is-integer/test.js
generated
vendored
Normal file
72
build/node_modules/is-integer/test.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
// jshint node:true
|
||||
"use strict";
|
||||
|
||||
// Tests taken directly from es6-shim number tests
|
||||
// https://github.com/paulmillr/es6-shim/blob/master/test/number.js
|
||||
|
||||
var test = require("tape");
|
||||
var isInteger = require("./");
|
||||
|
||||
// Values that are integers
|
||||
var INTEGERS = [
|
||||
5295,
|
||||
-5295,
|
||||
-9007199254740991,
|
||||
9007199254740991,
|
||||
0,
|
||||
-0,
|
||||
4,
|
||||
4.0,
|
||||
1801439850948,
|
||||
// Big numbers
|
||||
Math.pow(2, 53),
|
||||
1000000000000000000000,
|
||||
1000000000000000000000000000000000000,
|
||||
];
|
||||
|
||||
// Values that are not integers
|
||||
var NON_INTEGERS = [
|
||||
4.2,
|
||||
Infinity,
|
||||
-Infinity,
|
||||
NaN,
|
||||
true,
|
||||
false,
|
||||
"",
|
||||
"str",
|
||||
null,
|
||||
undefined,
|
||||
function () {},
|
||||
/a/g,
|
||||
{},
|
||||
{
|
||||
valueOf: function() { return 3; }
|
||||
},
|
||||
{
|
||||
valueOf: function() { return 0/0; }
|
||||
},
|
||||
{
|
||||
valueOf: function() { throw 17; }
|
||||
},
|
||||
{
|
||||
toString: function() { throw 17; }
|
||||
},
|
||||
{
|
||||
valueOf: function() { throw 17; },
|
||||
toString: function() { throw 42; }
|
||||
},
|
||||
];
|
||||
|
||||
test("integers should pass isInteger()", function(t) {
|
||||
INTEGERS.forEach(function(val) {
|
||||
t.ok(isInteger(val), JSON.stringify(val));
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test("non-integers should fail isInteger()", function(t) {
|
||||
NON_INTEGERS.forEach(function(val) {
|
||||
t.notOk(isInteger(val), JSON.stringify(val));
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user