Template Upload
This commit is contained in:
33
node_modules/invariant/CHANGELOG.md
generated
vendored
Normal file
33
node_modules/invariant/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
2.1.1 / 2015-09-20
|
||||
==================
|
||||
|
||||
* Use correct SPDX license.
|
||||
* Test "browser.js" using browserify.
|
||||
* Switch from "envify" to "loose-envify".
|
||||
|
||||
2.1.0 / 2015-06-03
|
||||
==================
|
||||
|
||||
* Add "envify" as a dependency.
|
||||
* Fixed license field in "package.json".
|
||||
|
||||
2.0.0 / 2015-02-21
|
||||
==================
|
||||
|
||||
* Switch to using the "browser" field. There are now browser and server versions that respect the "format" in production.
|
||||
|
||||
1.0.2 / 2014-09-24
|
||||
==================
|
||||
|
||||
* Added tests, npmignore and gitignore.
|
||||
* Clarifications in README.
|
||||
|
||||
1.0.1 / 2014-09-24
|
||||
==================
|
||||
|
||||
* Actually include 'invariant.js'.
|
||||
|
||||
1.0.0 / 2014-09-24
|
||||
==================
|
||||
|
||||
* Initial release.
|
27
node_modules/invariant/LICENSE
generated
vendored
Normal file
27
node_modules/invariant/LICENSE
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Copyright (c) 2016, Andres Suarez
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of invariant nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
37
node_modules/invariant/README.md
generated
vendored
Normal file
37
node_modules/invariant/README.md
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# invariant
|
||||
|
||||
[](https://travis-ci.org/zertosh/invariant)
|
||||
|
||||
A mirror of Facebook's `invariant` (e.g. [React](https://github.com/facebook/react/blob/v0.13.3/src/vendor/core/invariant.js), [flux](https://github.com/facebook/flux/blob/2.0.2/src/invariant.js)).
|
||||
|
||||
A way to provide descriptive errors in development but generic errors in production.
|
||||
|
||||
## Install
|
||||
|
||||
With [npm](http://npmjs.org) do:
|
||||
|
||||
```sh
|
||||
npm install invariant
|
||||
```
|
||||
|
||||
## `invariant(condition, message)`
|
||||
|
||||
```js
|
||||
var invariant = require('invariant');
|
||||
|
||||
invariant(someTruthyVal, 'This will not throw');
|
||||
// No errors
|
||||
|
||||
invariant(someFalseyVal, 'This will throw an error with this message');
|
||||
// Error: Invariant Violation: This will throw an error with this message
|
||||
```
|
||||
|
||||
**Note:** When `process.env.NODE_ENV` is not `production`, the message is required. If omitted, `invariant` will throw regardless of the truthiness of the condition. When `process.env.NODE_ENV` is `production`, the message is optional – so they can be minified away.
|
||||
|
||||
### Browser
|
||||
|
||||
When used with [browserify](https://github.com/substack/node-browserify), it'll use `browser.js` (instead of `invariant.js`) and the [envify](https://github.com/hughsk/envify) transform will inline the value of `process.env.NODE_ENV`.
|
||||
|
||||
### Node
|
||||
|
||||
The node version is optimized around the performance implications of accessing `process.env`. The value of `process.env.NODE_ENV` is cached, and repeatedly used instead of reading `proces.env`. See [Server rendering is slower with npm react #812](https://github.com/facebook/react/issues/812)
|
51
node_modules/invariant/browser.js
generated
vendored
Normal file
51
node_modules/invariant/browser.js
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Copyright 2013-2015, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Use invariant() to assert state which your program assumes to be true.
|
||||
*
|
||||
* Provide sprintf-style format (only %s is supported) and arguments
|
||||
* to provide information about what broke and what you were
|
||||
* expecting.
|
||||
*
|
||||
* The invariant message will be stripped in production, but the invariant
|
||||
* will remain to ensure logic does not differ in production.
|
||||
*/
|
||||
|
||||
var invariant = function(condition, format, a, b, c, d, e, f) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (format === undefined) {
|
||||
throw new Error('invariant requires an error message argument');
|
||||
}
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
var error;
|
||||
if (format === undefined) {
|
||||
error = new Error(
|
||||
'Minified exception occurred; use the non-minified dev environment ' +
|
||||
'for the full error message and additional helpful warnings.'
|
||||
);
|
||||
} else {
|
||||
var args = [a, b, c, d, e, f];
|
||||
var argIndex = 0;
|
||||
error = new Error(
|
||||
format.replace(/%s/g, function() { return args[argIndex++]; })
|
||||
);
|
||||
error.name = 'Invariant Violation';
|
||||
}
|
||||
|
||||
error.framesToPop = 1; // we don't care about invariant's own frame
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = invariant;
|
53
node_modules/invariant/invariant.js
generated
vendored
Normal file
53
node_modules/invariant/invariant.js
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
/**
|
||||
* Copyright 2013-2015, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Use invariant() to assert state which your program assumes to be true.
|
||||
*
|
||||
* Provide sprintf-style format (only %s is supported) and arguments
|
||||
* to provide information about what broke and what you were
|
||||
* expecting.
|
||||
*
|
||||
* The invariant message will be stripped in production, but the invariant
|
||||
* will remain to ensure logic does not differ in production.
|
||||
*/
|
||||
|
||||
var NODE_ENV = process.env.NODE_ENV;
|
||||
|
||||
var invariant = function(condition, format, a, b, c, d, e, f) {
|
||||
if (NODE_ENV !== 'production') {
|
||||
if (format === undefined) {
|
||||
throw new Error('invariant requires an error message argument');
|
||||
}
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
var error;
|
||||
if (format === undefined) {
|
||||
error = new Error(
|
||||
'Minified exception occurred; use the non-minified dev environment ' +
|
||||
'for the full error message and additional helpful warnings.'
|
||||
);
|
||||
} else {
|
||||
var args = [a, b, c, d, e, f];
|
||||
var argIndex = 0;
|
||||
error = new Error(
|
||||
format.replace(/%s/g, function() { return args[argIndex++]; })
|
||||
);
|
||||
error.name = 'Invariant Violation';
|
||||
}
|
||||
|
||||
error.framesToPop = 1; // we don't care about invariant's own frame
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = invariant;
|
7
node_modules/invariant/invariant.js.flow
generated
vendored
Normal file
7
node_modules/invariant/invariant.js.flow
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
/* @flow */
|
||||
|
||||
declare module.exports: (
|
||||
condition: any,
|
||||
format?: string,
|
||||
...args: Array<any>
|
||||
) => void;
|
100
node_modules/invariant/package.json
generated
vendored
Normal file
100
node_modules/invariant/package.json
generated
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"invariant@^2.2.0",
|
||||
"C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\typings-core"
|
||||
]
|
||||
],
|
||||
"_from": "invariant@>=2.2.0-0 <3.0.0-0",
|
||||
"_id": "invariant@2.2.2",
|
||||
"_inCache": true,
|
||||
"_location": "/invariant",
|
||||
"_nodeVersion": "6.3.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-18-east.internal.npmjs.com",
|
||||
"tmp": "tmp/invariant-2.2.2.tgz_1479211323359_0.31182572920806706"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "zertosh@gmail.com",
|
||||
"name": "zertosh"
|
||||
},
|
||||
"_npmVersion": "3.10.3",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "invariant",
|
||||
"raw": "invariant@^2.2.0",
|
||||
"rawSpec": "^2.2.0",
|
||||
"scope": null,
|
||||
"spec": ">=2.2.0-0 <3.0.0-0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/typings-core"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
|
||||
"_shasum": "9e1f56ac0acdb6bf303306f338be3b204ae60360",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "invariant@^2.2.0",
|
||||
"_where": "C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\typings-core",
|
||||
"author": {
|
||||
"email": "zertosh@gmail.com",
|
||||
"name": "Andres Suarez"
|
||||
},
|
||||
"browser": "browser.js",
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"loose-envify"
|
||||
]
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/zertosh/invariant/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.0.0"
|
||||
},
|
||||
"description": "invariant",
|
||||
"devDependencies": {
|
||||
"browserify": "^11.0.1",
|
||||
"flow-bin": "^0.35.0",
|
||||
"tap": "^1.4.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "9e1f56ac0acdb6bf303306f338be3b204ae60360",
|
||||
"tarball": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz"
|
||||
},
|
||||
"files": [
|
||||
"browser.js",
|
||||
"invariant.js",
|
||||
"invariant.js.flow"
|
||||
],
|
||||
"gitHead": "49ae54d5a09c99a447e7dafa46bd3aa8f6923d98",
|
||||
"homepage": "https://github.com/zertosh/invariant#readme",
|
||||
"installable": true,
|
||||
"keywords": [
|
||||
"invariant",
|
||||
"test"
|
||||
],
|
||||
"license": "BSD-3-Clause",
|
||||
"main": "invariant.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "cpojer",
|
||||
"email": "christoph.pojer@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "zertosh",
|
||||
"email": "zertosh@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "invariant",
|
||||
"optionalDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zertosh/invariant.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "NODE_ENV=production tap test/*.js && NODE_ENV=development tap test/*.js"
|
||||
},
|
||||
"version": "2.2.2"
|
||||
}
|
Reference in New Issue
Block a user