{"name":"@putout/plugin-apply-destructuring","version":"8.0.0","keywords":["putout","putout-plugin","plugin","destructuring"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-apply-destructuring@8.0.0","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-destructuring#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"07a0da5812ea5d41bc6a556b0367c7b7884e3826","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-destructuring/download/@putout/plugin-apply-destructuring-8.0.0.tgz","fileCount":7,"integrity":"sha512-PeCzNjI6GjdBwCqk/+hhXZ+p3CcoYhAkyjJ1FYjqotqXd9IxwMs/HZGO0zJOF+HYnKQXax0JbI5HHULInUbUFQ==","signatures":[{"sig":"MEMCIGyZ1wklUHUU9RNDBewQE7v2OVFg7ZfBCpl4qsvJm7IiAh8ehlaBIekGQ9RdQJ6j9dKFzLLcKKEbg3OMJNsw2nCR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5741,"size":2626,"noattachment":false,"key":"/@putout/plugin-apply-destructuring/-/@putout/plugin-apply-destructuring-8.0.0.tgz"},"main":"lib/index.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"e5959618a3e9ad1f154ab7a88c322934d378c5e5","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.1.0","description":"🐊Putout plugin adds ability use destructuring on variable declarations","directories":{},"_nodeVersion":"22.14.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^10.0.0","nodemon":"^3.0.1","@putout/test":"^12.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^2.0.0","eslint-plugin-putout":"^25.0.1"},"peerDependencies":{"putout":">=38"},"_npmOperationalInternal":{"tmp":"tmp/plugin-apply-destructuring_8.0.0_1740695146143_0.928012010732971","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/plugin-apply-destructuring [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-destructuring.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-destructuring\"npm\"\n\n> The **destructuring** assignment syntax is a **JavaScript** expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to use **destructuring** on variable declarations.\n\n## Install\n\n```\nnpm i @putout/plugin-apply-destructuring\n```\n\n## Rules\n\n- ✅ [object](#object);\n- ✅ [array](#array);\n- ✅ [falsy](#falsy);\n\n## Config\n\nShort:\n\n```json\n{\n    \"rules\": {\n        \"apply-destructuring\": \"on\"\n    }\n}\n```\n\nFull:\n\n```json\n{\n    \"rules\": {\n        \"apply-destructuring/object\": \"on\",\n        \"apply-destructuring/array\": \"on\",\n        \"apply-destructuring/falsy\": \"on\"\n    }\n}\n```\n\n## array\n\n## ❌ Example of incorrect code\n\n```js\nconst first = array[0];\n```\n\n## ✅ Example of correct code\n\n```js\nconst [first] = array;\n```\n\n## object\n\n## ❌ Example of incorrect code\n\n```js\nconst name = user.name;\n\nhello = world.hello;\n```\n\n## ✅ Example of correct code\n\n```js\nconst {name} = user;\n\n({hello} = world);\n```\n\n## falsy\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/c9ed04b421d75ae39e58038fa6e14630/4c097e3173990ec7e5ebabbe2cedf8e952092ebf).\n\n## ❌ Example of incorrect code\n\n```js\nconst {maxElementsInOneLine} = {\n    options,\n};\n```\n\n## ✅ Example of correct code\n\n```js\nconst {maxElementsInOneLine} = options;\n```\n\n## License\n\nMIT\n","publish_time":1740695146330,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_cnpm_publish_time":1740695146330,"dist-tags":{"latest":"10.1.1"}}