diff options
Diffstat (limited to 'node_modules/invariant')
-rw-r--r-- | node_modules/invariant/CHANGELOG.md | 69 | ||||
-rw-r--r-- | node_modules/invariant/LICENSE | 21 | ||||
-rw-r--r-- | node_modules/invariant/README.md | 37 | ||||
-rw-r--r-- | node_modules/invariant/browser.js | 49 | ||||
-rw-r--r-- | node_modules/invariant/invariant.js | 51 | ||||
-rw-r--r-- | node_modules/invariant/invariant.js.flow | 7 | ||||
-rw-r--r-- | node_modules/invariant/package.json | 70 |
7 files changed, 0 insertions, 304 deletions
diff --git a/node_modules/invariant/CHANGELOG.md b/node_modules/invariant/CHANGELOG.md deleted file mode 100644 index bc52f1c..0000000 --- a/node_modules/invariant/CHANGELOG.md +++ /dev/null @@ -1,69 +0,0 @@ -2.2.4 / 2018-03-13 -================== - - * Use flow strict mode (i.e. `@flow strict`). - -2.2.3 / 2018-02-19 -================== - - * Change license from BSD+Patents to MIT. - -2.2.2 / 2016-11-15 -================== - - * Add LICENSE file. - * Misc housekeeping. - -2.2.1 / 2016-03-09 -================== - - * Use `NODE_ENV` variable instead of `__DEV__` to cache `process.env.NODE_ENV`. - -2.2.0 / 2015-11-17 -================== - - * Use `error.name` instead of `Invariant Violation`. - -2.1.3 / 2015-11-17 -================== - - * Remove `@provideModule` pragma. - -2.1.2 / 2015-10-27 -================== - - * Fix license. - -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. diff --git a/node_modules/invariant/LICENSE b/node_modules/invariant/LICENSE deleted file mode 100644 index 188fb2b..0000000 --- a/node_modules/invariant/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013-present, Facebook, Inc. - -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/invariant/README.md b/node_modules/invariant/README.md deleted file mode 100644 index 4f18354..0000000 --- a/node_modules/invariant/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# 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 `process.env`. See [Server rendering is slower with npm react #812](https://github.com/facebook/react/issues/812) diff --git a/node_modules/invariant/browser.js b/node_modules/invariant/browser.js deleted file mode 100644 index b3941bc..0000000 --- a/node_modules/invariant/browser.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -'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; diff --git a/node_modules/invariant/invariant.js b/node_modules/invariant/invariant.js deleted file mode 100644 index b543e9f..0000000 --- a/node_modules/invariant/invariant.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -'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; diff --git a/node_modules/invariant/invariant.js.flow b/node_modules/invariant/invariant.js.flow deleted file mode 100644 index 462ab73..0000000 --- a/node_modules/invariant/invariant.js.flow +++ /dev/null @@ -1,7 +0,0 @@ -/* @flow strict */ - -declare module.exports: ( - condition: any, - format?: string, - ...args: Array<any> -) => void; diff --git a/node_modules/invariant/package.json b/node_modules/invariant/package.json deleted file mode 100644 index 3e31d64..0000000 --- a/node_modules/invariant/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "invariant@^2.2.2", - "_id": "invariant@2.2.4", - "_inBundle": false, - "_integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "_location": "/invariant", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "invariant@^2.2.2", - "name": "invariant", - "escapedName": "invariant", - "rawSpec": "^2.2.2", - "saveSpec": null, - "fetchSpec": "^2.2.2" - }, - "_requiredBy": [ - "/babel-traverse" - ], - "_resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "_shasum": "610f3c92c9359ce1db616e538008d23ff35158e6", - "_spec": "invariant@^2.2.2", - "_where": "/home/pruss/Dev/3-minute-website/node_modules/babel-traverse", - "author": { - "name": "Andres Suarez", - "email": "zertosh@gmail.com" - }, - "browser": "browser.js", - "browserify": { - "transform": [ - "loose-envify" - ] - }, - "bugs": { - "url": "https://github.com/zertosh/invariant/issues" - }, - "bundleDependencies": false, - "dependencies": { - "loose-envify": "^1.0.0" - }, - "deprecated": false, - "description": "invariant", - "devDependencies": { - "browserify": "^11.0.1", - "flow-bin": "^0.67.1", - "tap": "^1.4.0" - }, - "files": [ - "browser.js", - "invariant.js", - "invariant.js.flow" - ], - "homepage": "https://github.com/zertosh/invariant#readme", - "keywords": [ - "test", - "invariant" - ], - "license": "MIT", - "main": "invariant.js", - "name": "invariant", - "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.4" -} |