{"name":"@putout/plugin-convert-for-each-to-for-of","version":"8.1.1","type":"commonjs","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":"https://github.com/coderaiser/putout/tree/v28.19.2/packages/plugin-convert-for-each-to-for-of#readme","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/plugin-conditions":"*","@putout/plugin-convert-const-to-let":"*","@putout/plugin-remove-useless-continue":"*","@putout/plugin-remove-useless-variables":"*","@putout/test":"^6.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-n":"^15.2.4","eslint-plugin-putout":"^16.0.0","madrun":"^9.0.0"},"peerDependencies":{"putout":">=28"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"c1ac772b56b5a4f9a8182427feba1fec37ac7faa","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-for-each-to-for-of@8.1.1","_nodeVersion":"18.14.2","_npmVersion":"9.1.3","dist":{"integrity":"sha512-qXzZFKHjBAvcOW/IWYk/Qt3zYhkia+7wFQnPYHSiracubJkEr3IsdL0uUq3auKRFXDUKzBLiK0uKFEJufQ3KMg==","shasum":"e7b14f4e9d5f01b134909a1bc45afd0c83d5867a","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-for-each-to-for-of/download/@putout/plugin-convert-for-each-to-for-of-8.1.1.tgz","fileCount":4,"unpackedSize":8524,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDF9ovGmnDUO+TvqY34MpGvzhOMR7yynwSvce3TLtIh/wIgVNQX6zTwydTm9GIkcGpPvf+cD3UStwd6PcVgGmC6wy0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDOQJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpaARAAn2DL5b2QgvikWdFnXZFEhrg7sBPyTpqM9BKlqSjnz3GOcRjK\r\nWp5LmXmvVpo/519uujC2QUjaW/LSvYU1gDcdfhVffN/270bGQcB1MwYIzTwL\r\nxGWbpMl45UKC2xlQBE9TP8mMH9FjrWPZBwbqcxXx6OW5DqC3luy1qx52pTGp\r\n9W4WhQT19sfOt9l599wIxe0NEKGKecVaL6bM+dWXxBVWbwGVD2EZtyoSWbQ8\r\npGIRpkLmJC86/v5y2pHPEyE9hL+iI4fx7u2CeCpmFxWi6+NlK2k8PvIBlIRP\r\nxB5RNZlCtRhGYS2xm89lwx+1cCdM9bmKhDr7XKWDR3fUUjONmRiXxdUu6WGe\r\nPhdyTLsxmy/X7GQxA+ST+M+4E+6htaXbkrKe8wOMavWItUVzre/5J4IxFKy1\r\nEOyrc1Hj2e5i3Vu84QgfwRP6WUz3ouSng/QOnSrqBYh9dQX7g+CU4UnZRZNe\r\n7fsB6jzwlW7eJuiZuYmCzOm4p0BN7FF0BFPWP1nG5g3dpjiw+/3qlNykS0Me\r\n1yTEruxSQorWf5B7bT54CGGEUU/T4Siep9NMzaV6Bo/xSbqN0AoESBFUvE4H\r\nj/1mhM6QUuCb9R09tCWNRAnld17B1IGYpxDvgJpEInFBzTFUxUNw6guDa8sh\r\n3DoG9M98w/5GxmQa5K65YKnTQdMdcu8zOto=\r\n=FO/4\r\n-----END PGP SIGNATURE-----\r\n","size":3165,"noattachment":false,"key":"/@putout/plugin-convert-for-each-to-for-of/-/@putout/plugin-convert-for-each-to-for-of-8.1.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-convert-for-each-to-for-of_8.1.1_1678566408986_0.7778595112555227"},"_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":1678566409206,"_cnpm_publish_time":1678566409206,"dist-tags":{"latest":"8.1.1"}}