{"name":"@putout/plugin-convert-for-each-to-for-of","version":"5.2.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to convert forEach to for-of","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-for-each-to-for-of.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","only"],"devDependencies":{"@putout/eslint-config":"^1.0.2","@putout/test":"^2.0.0","coveralls":"^3.0.0","eslint":"^7.0.0-rc.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^5.0.1","madrun":"^7.0.0","nyc":"^15.0.1","supertape":"^2.0.0"},"peerDependencies":{"putout":">=7.17"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-for-each-to-for-of@5.2.0","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-3aYEzG/nGXQvydDqBvk5ieWYnAVqQFpZeSZ4aoK//cC+ir9YApCjkAumdH6uJy9qcn2x4OLWMxtcHeTRtTemWg==","shasum":"0f01cb14161d78bc90af7e873af6c900d1e98949","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-for-each-to-for-of/download/@putout/plugin-convert-for-each-to-for-of-5.2.0.tgz","fileCount":4,"unpackedSize":6825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhsleCRA9TVsSAnZWagAAIp4P+wRebAZZ9VMh5X9VEag6\nHHc1ljJuzGIfOEbB/RdSRt2zNpeECu809MRKv3bKBmf2C3O2jnaBmoqF30a2\nezzDukm8OtvCC1HQScAz9HBZYhk7oyB3Au71FzZ5jr714O+JHb2wr1izQK46\nKEO3oFtaE252kkbWO98412Dy2HCX/pRaqS0cjjTbnHr0ch3D4mjkpyqp6M06\nA4Zz9pCW0/Citk5fdicDbrVhSOK8EvPpxv10smJWQpfoI3vBn74/DdxHMVdR\ni8OA5aSX/2hHP2KW1ElbwVtIj5/TZHyTLjWxdoqm8NZoQczH0FSgsExZFmWF\njb8en8A9NB649I1VxF/8ZACcjUSkbeFUpfxBsMLlJ7029nz/SNlEHqQpOisP\nrfooRTRf2kUKlau+L3G+gQgmZHf05kcVsi/Z1AWj1WBiO3VpaSieJ4o7tqlV\nama30kD+NmuMUuJ1u2EESxjVfG40NflnJ8lFegkGRHZKceZlB8uV8A5mlWw8\nBIE2MyuJq1GpNR21Z5cLpo1dihZDe+/7ryUyDYVGmwAij0iBeJV2DQQMg7Dw\nZlFWK2dSGtJ/75sGDgwofgUHn6Jj0fh8Yc+B+kH7J0B0mgSN4FyFypczooPV\niq95ngme9ZBNAi28eWTwisL4Zmfxk4Bd3rkQqEgWpF2JEArz1rqLCedcWmsO\nSBmL\r\n=HV2d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVCgz85PLAZ9cCUJNf/74gfblAYBFtoXKsZ/RMKcQdfwIgLG4LC2vEKwvgCKy75m2addf81tyNkt5enEuyXyjbQXE="}],"size":2770,"noattachment":false,"key":"/@putout/plugin-convert-for-each-to-for-of/-/@putout/plugin-convert-for-each-to-for-of-5.2.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-for-each-to-for-of_5.2.0_1602668893843_0.5289336792694419"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-convert-for-each-to-for-of [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-for-each-to-for-of.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-for-each-to-for-of \"npm\"\n\n> The [`forEach()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) method executes a provided function once for each array element.\n>\n> The [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement creates a loop which invokes a custom iteration hook with statements to be executed for the value of each element of an array.\n>\n> (c) MDN\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `forEach()` to `for...of`.\nComplements [`@putout/plugin-convert-const-to-let`](https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-const-to-let#readme). Merged to [`@putout/plugin-for-of`](https://www.npmjs.com/package/@putout/plugin-for-of).\n\n## Install\n\n```\nnpm i @putout/plugin-convert-for-each-to-for-of -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"convert-for-each-to-for-of\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nObject.keys(json).forEach((name) => {\n    manage(name, json[name]);\n});\n\n[].forEach.call(arguments, (item) => {\n    console.log(item);\n});\n```\n\n## ✅ Example of correct code\n\n```js\nfor (const name of Object.keys(json)) {\n    manage(name, json[name]);\n}\n\nfor (const name of arguments) {\n    console.log(item);\n}\n```\n\n## License\n\nMIT\n","publish_time":1602668893992,"_cnpm_publish_time":1602668893992,"dist-tags":{"latest":"8.1.1"}}