{ "_id": "invariant", "_rev": "47-ce79942b20af13905f693458059dc76a", "name": "invariant", "description": "invariant", "dist-tags": { "latest": "2.2.4" }, "versions": { "1.0.0": { "name": "invariant", "version": "1.0.0", "description": "invariant", "licence": "BSD", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "repository": { "type": "git", "url": "git://github.com/zertosh/invariant.git" }, "scripts": { "test": "mocha" }, "dependencies": {}, "devDependencies": {}, "engines": { "node": ">=0.10" }, "gitHead": "144d0b5367be59e274b54fab2f3e44b24ca636d1", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant", "_id": "invariant@1.0.0", "_shasum": "42c5faae85d09f491ba9b23e8f49a2c2561b9cc0", "_from": ".", "_npmVersion": "1.4.28", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "maintainers": [ { "name": "zertosh", "email": "zertosh@gmail.com" } ], "dist": { "shasum": "42c5faae85d09f491ba9b23e8f49a2c2561b9cc0", "tarball": "https://registry.npmjs.org/invariant/-/invariant-1.0.0.tgz" }, "directories": {} }, "1.0.1": { "name": "invariant", "version": "1.0.1", "description": "invariant", "licence": "BSD", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "main": "invariant.js", "repository": { "type": "git", "url": "git://github.com/zertosh/invariant.git" }, "scripts": { "test": "mocha" }, "dependencies": {}, "devDependencies": {}, "engines": { "node": ">=0.10" }, "gitHead": "2828507a4e81a501b1b89d7f48ec6f805c0cb1c0", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant", "_id": "invariant@1.0.1", "_shasum": "6babcaa50275f578d255cfbc537ee47416783b99", "_from": ".", "_npmVersion": "1.4.28", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "maintainers": [ { "name": "zertosh", "email": "zertosh@gmail.com" } ], "dist": { "shasum": "6babcaa50275f578d255cfbc537ee47416783b99", "tarball": "https://registry.npmjs.org/invariant/-/invariant-1.0.1.tgz" }, "directories": {} }, "1.0.2": { "name": "invariant", "version": "1.0.2", "description": "invariant", "licence": "BSD", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "main": "invariant.js", "repository": { "type": "git", "url": "git://github.com/zertosh/invariant.git" }, "scripts": { "test": "mocha" }, "dependencies": {}, "devDependencies": { "mocha": "^1.21.4" }, "engines": { "node": ">=0.10" }, "gitHead": "e46b80010539e277227bf288c962efa7438ead27", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant", "_id": "invariant@1.0.2", "_shasum": "753c9a32987c5e8077774aad5a62d7a54727ee77", "_from": ".", "_npmVersion": "1.4.28", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "maintainers": [ { "name": "zertosh", "email": "zertosh@gmail.com" } ], "dist": { "shasum": "753c9a32987c5e8077774aad5a62d7a54727ee77", "tarball": "https://registry.npmjs.org/invariant/-/invariant-1.0.2.tgz" }, "directories": {} }, "2.0.0": { "name": "invariant", "version": "2.0.0", "description": "invariant", "licence": "BSD", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "files": [ "README.md", "invariant.js", "browser.js" ], "repository": { "type": "git", "url": "git://github.com/zertosh/invariant.git" }, "scripts": { "test": "NODE_ENV=production mocha && NODE_ENV=development mocha" }, "dependencies": {}, "devDependencies": { "mocha": "^2.1.0" }, "engines": { "node": ">=0.10" }, "main": "invariant.js", "browser": "browser.js", "browserify": { "transform": [ "envify" ] }, "gitHead": "cf49677cfa4d1bd08513454c08a0e49d551cf28e", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant", "_id": "invariant@2.0.0", "_shasum": "431d04ba12b6c63935b129ce6d3f5b009e6b6411", "_from": ".", "_npmVersion": "1.4.28", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "maintainers": [ { "name": "zertosh", "email": "zertosh@gmail.com" } ], "dist": { "shasum": "431d04ba12b6c63935b129ce6d3f5b009e6b6411", "tarball": "https://registry.npmjs.org/invariant/-/invariant-2.0.0.tgz" }, "directories": {} }, "2.1.0": { "name": "invariant", "version": "2.1.0", "description": "invariant", "license": "BSD", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "files": [ "README.md", "invariant.js", "browser.js" ], "repository": { "type": "git", "url": "git://github.com/zertosh/invariant.git" }, "scripts": { "test": "NODE_ENV=production mocha && NODE_ENV=development mocha" }, "dependencies": { "envify": "^3.0.0" }, "devDependencies": { "mocha": "^2.1.0" }, "engines": { "node": ">=0.10" }, "main": "invariant.js", "browser": "browser.js", "browserify": { "transform": [ "envify" ] }, "gitHead": "93cfa951e2652aa0211a315feedcc534c54cc721", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant#readme", "_id": "invariant@2.1.0", "_shasum": "6d2cc59a6a272ad307c52c1517ad5920219b996e", "_from": ".", "_npmVersion": "2.11.0", "_nodeVersion": "0.10.38", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "maintainers": [ { "name": "zertosh", "email": "zertosh@gmail.com" } ], "dist": { "shasum": "6d2cc59a6a272ad307c52c1517ad5920219b996e", "tarball": "https://registry.npmjs.org/invariant/-/invariant-2.1.0.tgz" }, "directories": {} }, "2.1.1": { "name": "invariant", "version": "2.1.1", "description": "invariant", "keywords": [ "test" ], "license": "BSD-4-Clause", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "files": [ "invariant.js", "browser.js" ], "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" }, "dependencies": { "loose-envify": "^1.0.0" }, "devDependencies": { "browserify": "^11.0.1", "tap": "^1.4.0" }, "main": "invariant.js", "browser": "browser.js", "browserify": { "transform": [ "loose-envify" ] }, "gitHead": "86a1687215f258a10ec16e6eadd7777ff0b3ad94", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant#readme", "_id": "invariant@2.1.1", "_shasum": "e0264e73ca7df84515d5487019a2ddc817bdd31d", "_from": ".", "_npmVersion": "2.14.3", "_nodeVersion": "4.1.0", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "maintainers": [ { "name": "zertosh", "email": "zertosh@gmail.com" } ], "dist": { "shasum": "e0264e73ca7df84515d5487019a2ddc817bdd31d", "tarball": "https://registry.npmjs.org/invariant/-/invariant-2.1.1.tgz" }, "directories": {} }, "2.1.2": { "name": "invariant", "version": "2.1.2", "description": "invariant", "keywords": [ "test" ], "license": "BSD-3-Clause", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "files": [ "invariant.js", "browser.js" ], "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" }, "dependencies": { "loose-envify": "^1.0.0" }, "devDependencies": { "browserify": "^11.0.1", "tap": "^1.4.0" }, "main": "invariant.js", "browser": "browser.js", "browserify": { "transform": [ "loose-envify" ] }, "gitHead": "1555880c5bcc46e2eda25fae84d62fd28b5c9090", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant#readme", "_id": "invariant@2.1.2", "_shasum": "43f372e09b57414b85a5ebc904dc69260d161129", "_from": ".", "_npmVersion": "2.14.3", "_nodeVersion": "4.1.0", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "maintainers": [ { "name": "zertosh", "email": "zertosh@gmail.com" } ], "dist": { "shasum": "43f372e09b57414b85a5ebc904dc69260d161129", "tarball": "https://registry.npmjs.org/invariant/-/invariant-2.1.2.tgz" }, "directories": {} }, "2.1.3": { "name": "invariant", "version": "2.1.3", "description": "invariant", "keywords": [ "test" ], "license": "BSD-3-Clause", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "files": [ "invariant.js", "browser.js" ], "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" }, "dependencies": { "loose-envify": "^1.0.0" }, "devDependencies": { "browserify": "^11.0.1", "tap": "^1.4.0" }, "main": "invariant.js", "browser": "browser.js", "browserify": { "transform": [ "loose-envify" ] }, "gitHead": "992a17c74d3f848eb40ea4938ed412a705871a20", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant#readme", "_id": "invariant@2.1.3", "_shasum": "3bf684cc66e0153fa0e9ce517799e95a0f399e7a", "_from": ".", "_npmVersion": "2.14.7", "_nodeVersion": "4.2.2", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "maintainers": [ { "name": "zertosh", "email": "zertosh@gmail.com" } ], "dist": { "shasum": "3bf684cc66e0153fa0e9ce517799e95a0f399e7a", "tarball": "https://registry.npmjs.org/invariant/-/invariant-2.1.3.tgz" }, "directories": {} }, "2.2.0": { "name": "invariant", "version": "2.2.0", "description": "invariant", "keywords": [ "test" ], "license": "BSD-3-Clause", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "files": [ "invariant.js", "browser.js" ], "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" }, "dependencies": { "loose-envify": "^1.0.0" }, "devDependencies": { "browserify": "^11.0.1", "tap": "^1.4.0" }, "main": "invariant.js", "browser": "browser.js", "browserify": { "transform": [ "loose-envify" ] }, "gitHead": "1660eab9f183183e71ef57a7765bb1121680fff9", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant#readme", "_id": "invariant@2.2.0", "_shasum": "c8d7e847366a49cc18b622f058a689d481e895f2", "_from": ".", "_npmVersion": "2.14.7", "_nodeVersion": "4.2.2", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "maintainers": [ { "name": "zertosh", "email": "zertosh@gmail.com" } ], "dist": { "shasum": "c8d7e847366a49cc18b622f058a689d481e895f2", "tarball": "https://registry.npmjs.org/invariant/-/invariant-2.2.0.tgz" }, "directories": {} }, "2.2.1": { "name": "invariant", "version": "2.2.1", "description": "invariant", "keywords": [ "test" ], "license": "BSD-3-Clause", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "files": [ "invariant.js", "browser.js" ], "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" }, "dependencies": { "loose-envify": "^1.0.0" }, "devDependencies": { "browserify": "^11.0.1", "tap": "^1.4.0" }, "main": "invariant.js", "browser": "browser.js", "browserify": { "transform": [ "loose-envify" ] }, "gitHead": "594d6cbcde933a7bd3ecd76a7c4f19892a95e0de", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant#readme", "_id": "invariant@2.2.1", "_shasum": "b097010547668c7e337028ebe816ebe36c8a8d54", "_from": ".", "_npmVersion": "2.14.4", "_nodeVersion": "4.1.1", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "dist": { "shasum": "b097010547668c7e337028ebe816ebe36c8a8d54", "tarball": "https://registry.npmjs.org/invariant/-/invariant-2.2.1.tgz" }, "maintainers": [ { "name": "cpojer", "email": "christoph.pojer@gmail.com" }, { "name": "zertosh", "email": "zertosh@gmail.com" } ], "_npmOperationalInternal": { "host": "packages-13-west.internal.npmjs.com", "tmp": "tmp/invariant-2.2.1.tgz_1457504319192_0.7920392917003483" }, "directories": {} }, "2.2.2": { "name": "invariant", "version": "2.2.2", "description": "invariant", "keywords": [ "test", "invariant" ], "license": "BSD-3-Clause", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "files": [ "browser.js", "invariant.js", "invariant.js.flow" ], "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" }, "dependencies": { "loose-envify": "^1.0.0" }, "devDependencies": { "browserify": "^11.0.1", "flow-bin": "^0.35.0", "tap": "^1.4.0" }, "main": "invariant.js", "browser": "browser.js", "browserify": { "transform": [ "loose-envify" ] }, "gitHead": "49ae54d5a09c99a447e7dafa46bd3aa8f6923d98", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant#readme", "_id": "invariant@2.2.2", "_shasum": "9e1f56ac0acdb6bf303306f338be3b204ae60360", "_from": ".", "_npmVersion": "3.10.3", "_nodeVersion": "6.3.0", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "dist": { "shasum": "9e1f56ac0acdb6bf303306f338be3b204ae60360", "tarball": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz" }, "maintainers": [ { "name": "cpojer", "email": "christoph.pojer@gmail.com" }, { "name": "zertosh", "email": "zertosh@gmail.com" } ], "_npmOperationalInternal": { "host": "packages-18-east.internal.npmjs.com", "tmp": "tmp/invariant-2.2.2.tgz_1479211323359_0.31182572920806706" }, "directories": {} }, "2.2.3": { "name": "invariant", "version": "2.2.3", "description": "invariant", "keywords": [ "test", "invariant" ], "license": "MIT", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "files": [ "browser.js", "invariant.js", "invariant.js.flow" ], "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" }, "dependencies": { "loose-envify": "^1.0.0" }, "devDependencies": { "browserify": "^11.0.1", "flow-bin": "^0.35.0", "tap": "^1.4.0" }, "main": "invariant.js", "browser": "browser.js", "browserify": { "transform": [ "loose-envify" ] }, "gitHead": "d95f37254e5d284623964678f8318968f2f701de", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant#readme", "_id": "invariant@2.2.3", "_npmVersion": "5.6.0", "_nodeVersion": "9.5.0", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "dist": { "integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==", "shasum": "1a827dfde7dcbd7c323f0ca826be8fa7c5e9d688", "tarball": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz", "fileCount": 7, "unpackedSize": 7025 }, "maintainers": [ { "name": "cpojer", "email": "christoph.pojer@gmail.com" }, { "name": "zertosh", "email": "zertosh@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/invariant_2.2.3_1519074858054_0.5983363337214471" }, "_hasShrinkwrap": false }, "2.2.4": { "name": "invariant", "version": "2.2.4", "description": "invariant", "keywords": [ "test", "invariant" ], "license": "MIT", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "files": [ "browser.js", "invariant.js", "invariant.js.flow" ], "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" }, "dependencies": { "loose-envify": "^1.0.0" }, "devDependencies": { "browserify": "^11.0.1", "flow-bin": "^0.67.1", "tap": "^1.4.0" }, "main": "invariant.js", "browser": "browser.js", "browserify": { "transform": [ "loose-envify" ] }, "gitHead": "ce95a9badeee1c97daff1bca0d1f6cec5dda4fe8", "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "homepage": "https://github.com/zertosh/invariant#readme", "_id": "invariant@2.2.4", "_npmVersion": "5.6.0", "_nodeVersion": "9.5.0", "_npmUser": { "name": "zertosh", "email": "zertosh@gmail.com" }, "dist": { "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "shasum": "610f3c92c9359ce1db616e538008d23ff35158e6", "tarball": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "fileCount": 7, "unpackedSize": 7639 }, "maintainers": [ { "name": "cpojer", "email": "christoph.pojer@gmail.com" }, { "name": "zertosh", "email": "zertosh@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/invariant_2.2.4_1520966170158_0.9004438268314274" }, "_hasShrinkwrap": false } }, "readme": "# invariant\n\n[![Build Status](https://travis-ci.org/zertosh/invariant.svg?branch=master)](https://travis-ci.org/zertosh/invariant)\n\nA 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)).\n\nA way to provide descriptive errors in development but generic errors in production.\n\n## Install\n\nWith [npm](http://npmjs.org) do:\n\n```sh\nnpm install invariant\n```\n\n## `invariant(condition, message)`\n\n```js\nvar invariant = require('invariant');\n\ninvariant(someTruthyVal, 'This will not throw');\n// No errors\n\ninvariant(someFalseyVal, 'This will throw an error with this message');\n// Error: Invariant Violation: This will throw an error with this message\n```\n\n**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.\n\n### Browser\n\nWhen 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`.\n\n### Node\n\nThe 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)\n", "maintainers": [ { "name": "cpojer", "email": "christoph.pojer@gmail.com" }, { "name": "zertosh", "email": "zertosh@gmail.com" } ], "time": { "modified": "2019-05-23T08:36:49.353Z", "created": "2014-09-24T04:46:06.057Z", "1.0.0": "2014-09-24T04:46:06.057Z", "1.0.1": "2014-09-24T04:52:41.163Z", "1.0.2": "2014-09-24T15:11:55.938Z", "2.0.0": "2015-02-21T21:00:56.992Z", "2.1.0": "2015-06-03T20:04:01.546Z", "2.1.1": "2015-09-21T05:44:39.949Z", "2.1.2": "2015-10-27T23:34:30.290Z", "2.1.3": "2015-11-17T16:41:12.061Z", "2.2.0": "2015-11-17T16:45:40.580Z", "2.2.1": "2016-03-09T06:18:41.916Z", "2.2.2": "2016-11-15T12:02:03.890Z", "2.2.3": "2018-02-19T21:14:18.197Z", "2.2.4": "2018-03-13T18:36:10.235Z" }, "homepage": "https://github.com/zertosh/invariant#readme", "repository": { "type": "git", "url": "git+https://github.com/zertosh/invariant.git" }, "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "bugs": { "url": "https://github.com/zertosh/invariant/issues" }, "readmeFilename": "README.md", "license": "MIT", "users": { "tsm91": true, "yatsu": true, "nelix": true, "jrnail23": true, "udnisap": true, "erickeno": true, "jnoodle": true, "yaodianmi": true, "markthethomas": true, "dreamanddead": true, "twierbach": true, "conantonakos": true, "domjtalbot": true, "tedyhy": true, "heartnett": true, "krzkaczor": true, "adrtho4": true, "mochadwi": true, "liximomo": true, "princetoad": true, "doublelift": true, "hewenxuan": true, "monjer": true, "pftom": true }, "keywords": [ "test", "invariant" ] }