{"name":"@putout/plugin-declare-undefined-variables","version":"2.3.1","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to transform code to new API of Cloud Commander","homepage":"http://github.com/coderaiser/putout","main":"lib/declare-undefined-variables.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","declare-undefined-variables"],"devDependencies":{"@putout/plugin-remove-unused-expressions":"*","@putout/plugin-strict-mode":"*","@putout/test":"^3.0.0","c8":"^7.5.0","eslint":"^8.0.0-beta.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^10.0.0","lerna":"^4.0.0","madrun":"^8.0.1","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=19"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"gitHead":"f168709a89a9810e88df67925561d2cae7e115cd","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-declare-undefined-variables@2.3.1","_nodeVersion":"16.9.0","_npmVersion":"7.21.1","dist":{"integrity":"sha512-l4Kv8pQZ5lbZIkaN2IEG1Oy0/+sBWsHnys2XUHVczVU0mT06eoBM1Vx526FKnQUecpzEue/nl1lU9BIbUxhlZQ==","shasum":"a5e64e1f0802d0e5597b153a1b02d81fb3aafe8e","tarball":"http://registry-npm.ywwl.com/@putout/plugin-declare-undefined-variables/download/@putout/plugin-declare-undefined-variables-2.3.1.tgz","fileCount":6,"unpackedSize":9851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhRGLfCRA9TVsSAnZWagAAZCwP/3OKycfQblcu3fBtpyCK\nacqhPz8k+FJRLp4byZI5+C15BfLM0G5OlBaokPMXcKDNPbRD+oMHAHx8x9na\nqCcN4di4FSwXVvBGrglQDxVdn5LjfKtlqKj6PKw0rvPMqyqeg/LLMqOMrwoT\n2bPo/0E8AEUGSGw8bJAu1CUG8Qr4YTLwWBn2fh4PHYbkpnd8YR00E1IFlamR\nb+8TrfvaHnP6KYq/YtEYUh6dotry3XE2hSkAtMA977cNsFvnHNnON9j3cK9+\n5q/IOR1E7gSHzyAHA4GQCFtu+9puiuzcw1W1V7mekUhke4iX5Oz/TuEviSep\nj6jhVGX+XweHHhpnF4kJGfPZeYP+/L3WFJk1RRa1EmwfI5iqaKippfRBEhTG\nfR0P2+mb9BRfpUYEWkM3tH1UlTNOFmbXNHriFmG9He8liPTzcMcsvk4JwxDc\nEd8tMcA+fcn7LRZvTtuidnlLWnI5a6Io6xu+kzXY2oDp63iFdSJmvEJkweD/\nZa2MdcBp3LgLr24aRu3QJP68ictQiPF8Tyf6GpB2UiSTqQDZKqOh2VxGmxIb\nmeakq0BqTMOEpkaY+r2NUTzIsfDYjUIoT6gsXqFdMONE6Hd+f2bH1wExIgkO\nkXEGiwWZmsXI1p2sRhRDG4kQ0fdt6WmErv640CLW3jRRtChjHORpdDQfUEjr\n3u3F\r\n=T/vd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhdBC+9ecTbcJGcRsNiPWukaey5NfLUxtUgxyPsZZvIAIhAPfcLG3N0rUt/TMBLW7/ssc2MVhLe9JQWi0PccpDyG/g"}],"size":3236,"noattachment":false,"key":"/@putout/plugin-declare-undefined-variables/-/@putout/plugin-declare-undefined-variables-2.3.1.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-declare-undefined-variables_2.3.1_1631871711770_0.17060980955935157"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-declare-undefined-variables [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-declare-undefined-variables.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-declare-undefined-variables\"npm\"\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to declare variable that was not defined before, including:\n\n- is types: `isFn`, `isString`, `isNumber`, `isObject`, `isBool`, `isUndefined`, `isSymbol` and `isNull`;\n- [maybe](https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-maybe#readme): `maybeArray`, `maybeFn`, `maybeEmptyArray`;\n- wrap: `not`,`id`, `returns`;\n- fresh-import: `freshImport`, `freshImportDefault`;\n- `fixtures`: `readFixture(name)`;\n- properties of `Object`;\n- [wraptile](https://github.com/coderaiser/wraptile);\n- [fullstore](https://github.com/coderaiser/fullstore);\n- [currify](https://github.com/coderaiser/currify);\n- [pipe-io](https://github.com/coderaiser/pipe-io);\n- [pullout](https://github.com/coderaiser/pullout);\n- [simport](https://github.com/coderaiser/simport);\n- [chalk](https://www.npmjs.com/package/chalk);\n- [table](https://www.npmjs.com/package/table);\n\nRenamed to [`@putout/plugin-declare`](https://www.npmjs.com/package/@putout/plugin-declare).\n\n## Install\n\n```\nnpm i putout @putout/plugin-declare-undefined-variables -D\n```\n\nAdd `.putout.json` with:\n\n```json\n{\n    \"plugins\": {\n        \"declare-undefined-variables\": \"on\"\n    }\n}\n```\n\n## Rules\n\nUse options:\n\n- ✅ `dismiss` for variables you don't want to declare;\n- ✅ `declarations` to declare variables;\n\n```json\n{\n    \"rules\": {\n        \"declare-undefined-variables\": [\"on\", {\n            \"declarations\": {\n                \"hello\": \"import {hello} from 'world'\"\n            },\n            \"dismiss\": [\n                \"assert\",\n                \"entries\",\n                \"parse\",\n                \"stringify\",\n                \"defineProperty\",\n                \"isArray\",\n                \"noop\",\n                \"join\",\n                \"keys\",\n                \"values\",\n                \"stopAll\",\n                \"once\",\n                \"putout\",\n                \"simport\"\n            ]\n        }]\n    }\n}\n```\n\n# `assign`\n\n## ❌ Example of incorrect code\n\n```js\nconst hello = 'world';\nconst object = {};\n\nassign(object, {\n    hello,\n});\n```\n\n## ✅ Example of correct code\n\n```js\nconst hello = 'world';\nconst object = {};\nconst {assign} = Object;\n\nassign(object, {\n    hello,\n});\n```\n\n# `keys`\n\n## ❌ Example of incorrect code\n\n```js\nconst hello = 'world';\nconst object = {};\n\nconst allKeys = keys(object);\n```\n\n## ✅ Example of correct code\n\n```js\nconst hello = 'world';\nconst object = {};\nconst {keys} = Object;\n\nconst allKeys = keys(object);\n```\n\n# `values`\n\n## ❌ Example of incorrect code\n\n```js\nconst object = {};\nconst allValues = values(object);\n```\n\n## ✅ Example of correct code\n\n```js\nconst {values} = Object;\n\nconst object = {};\nconst allValues = values(object);\n```\n\n# `isArray`\n\n## ❌ Example of incorrect code\n\n```js\nisArray(array);\n```\n\n## ✅ Example of correct code\n\n```js\nconst {isArray} = Array;\nisArray(array);\n```\n\n# `noop`\n\n## ❌ Example of incorrect code\n\n```js\nnoop();\n```\n\n## ✅ Example of correct code\n\n```js\nconst noop = () => {};\nnoop();\n```\n\n# Types\n\n## ❌ Example of incorrect code\n\n```js\nif (isFn(fn))\n    fn();\n```\n\n## ✅ Example of correct code\n\n```js\nconst isFn = (a) => typeof a === 'function';\n\nif (isFn(fn))\n    fn();\n```\n\n# Maybe\n\n## ❌ Example of incorrect code\n\n```js\nconst a = [\n    ...maybeArray(b),\n];\n```\n\n## ✅ Example of correct code\n\n```js\nconst {isArray} = Array;\nconst maybeArray = (a) => isArray(a) ? a : [a];\n\nconst a = [\n    ...maybeArray(b),\n];\n```\n\n## License\n\nMIT\n","publish_time":1631871711905,"_cnpm_publish_time":1631871711905,"dist-tags":{"latest":"8.0.3"}}