canonical
Version:
Canonical code style linter and formatter for JavaScript, SCSS and CSS.
73 lines (72 loc) • 3.51 kB
JSON
{
"_args": [
[
"invariant@https://registry.npmjs.org/invariant/-/invariant-2.2.0.tgz",
"/Users/gajus/Documents/dev/canonical-code-style/canonical"
]
],
"_from": "invariant@>=2.2.0 <3.0.0",
"_id": "invariant@2.2.0",
"_inCache": true,
"_location": "/invariant",
"_phantomChildren": {},
"_requested": {
"name": "invariant",
"raw": "invariant@https://registry.npmjs.org/invariant/-/invariant-2.2.0.tgz",
"rawSpec": "https://registry.npmjs.org/invariant/-/invariant-2.2.0.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/invariant/-/invariant-2.2.0.tgz",
"type": "remote"
},
"_requiredBy": [
"/babel-traverse"
],
"_resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.0.tgz",
"_shasum": "c8d7e847366a49cc18b622f058a689d481e895f2",
"_shrinkwrap": null,
"_spec": "invariant@https://registry.npmjs.org/invariant/-/invariant-2.2.0.tgz",
"_where": "/Users/gajus/Documents/dev/canonical-code-style/canonical",
"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",
"tap": "^1.4.0"
},
"files": [
"browser.js",
"invariant.js"
],
"homepage": "https://github.com/zertosh/invariant#readme",
"keywords": [
"test"
],
"license": "BSD-3-Clause",
"main": "invariant.js",
"name": "invariant",
"optionalDependencies": {},
"readme": "# invariant\n\n[](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\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 `proces.env`. See [Server rendering is slower with npm react #812](https://github.com/facebook/react/issues/812)\n",
"readmeFilename": "README.md",
"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.0"
}