{"name":"@putout/plugin-extract-object-properties","version":"10.0.0","keywords":["putout","putout-plugin","plugin","remove","only"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-extract-object-properties@10.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-extract-object-properties#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"a8b2a091f4672b0a2ead99c0ff2c7abe6d8adb72","tarball":"http://registry-npm.ywwl.com/@putout/plugin-extract-object-properties/download/@putout/plugin-extract-object-properties-10.0.0.tgz","fileCount":6,"integrity":"sha512-UN0MitsHe+X5GZN+lhfvs9tgVvidkygdlFo0EN3VH3iTrC5lWCJwMRCvaa+FL4u4Qs9osoe6zZLlu5xwvnHUAA==","signatures":[{"sig":"MEUCIQDpuybifhYS4GyF5FAZJTnXN1nvt8PMNP//WTTO8NrsewIgPQqsF9LTxUDp1ZpNTB7/4P0Ui7WNGoxuKsrHTstkYGk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8009,"size":3024,"noattachment":false,"key":"/@putout/plugin-extract-object-properties/-/@putout/plugin-extract-object-properties-10.0.0.tgz"},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"gitHead":"5f7a6aa1dc275858a1edf8fd6b11764a7fa0c311","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 to extract object properties into variable","directories":{},"_nodeVersion":"20.19.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^11.0.0","@putout/test":"^13.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^3.0.0","eslint-plugin-putout":"^27.0.0","@putout/plugin-putout":"*","@putout/plugin-apply-destructuring":"*","@putout/plugin-remove-unused-variables":"*"},"peerDependencies":{"putout":">=40"},"_npmOperationalInternal":{"tmp":"tmp/plugin-extract-object-properties_10.0.0_1749663363651_0.19851661583066882","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/plugin-extract-object-properties [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-extract-object-properties.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-extract-object-properties \"npm\"\n\n> The **destructuring assignment** makes possible to unpack values 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 apply destructuring to extract object properties. Merged with [`@putout/plugin-destructuring`](https://www.npmjs.com/package/@putout/plugin-destructuring).\n\n## Install\n\n```\nnpm i @putout/plugin-extract-object-properties -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"extract-object-properties/equal-deep\": \"on\",\n        \"extract-object-properties/not-equal-deep\": \"on\"\n    }\n}\n```\n\n## Equal Deep\n\n### ❌ Example of incorrect code\n\n```js\nconst {replaceWith} = a.operate;\nconst {isIdentifier} = a.types;\n```\n\n### ✅ Example of correct code\n\n```js\nconst {operator, types} = a;\n\nconst {replaceWith} = operator;\nconst {isIdentifier} = types;\n```\n\n## Not Equal Deep\n\n### ❌ Example of incorrect code\n\n```js\nconst {replaceWith} = a;\nconst {isIdentifier} = a.types;\n```\n\n### ✅ Example of correct code\n\n```js\nconst {replaceWith, types} = a;\n\nconst {isIdentifier} = types;\n```\n\n## License\n\nMIT\n","publish_time":1749663363861,"_cnpm_publish_time":1749663363861,"dist-tags":{"latest":"10.0.1"}}