{"name":"@putout/plugin-convert-for-each-to-for-of","version":"7.1.2","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/master/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-convert-comparison-to-boolean":"*","@putout/plugin-convert-const-to-let":"*","@putout/plugin-remove-useless-variables":"*","@putout/test":"^5.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^15.0.0","madrun":"^9.0.0"},"peerDependencies":{"putout":">=24"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"gitHead":"5d3c60255a07c76ed77ea28804341a1a4e35d1d6","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-for-each-to-for-of@7.1.2","_nodeVersion":"18.3.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-KH7HgUroLzi78aKeXrwIZIsJ8FFU+UoeUxERxNGwPgPgZTR2L/YSP3grDLxYfv9aq0Ak/jNL2ZOzRZpKHUEMjw==","shasum":"f47aabfd952e1c1190822ea55a23d71472318382","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-for-each-to-for-of/download/@putout/plugin-convert-for-each-to-for-of-7.1.2.tgz","fileCount":4,"unpackedSize":8421,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC389NKn/COq/nG8flobGF0FK7pSz8yKOTHuxNGHmmESAIhAI41Xbmma/x3+FKYIf169u9BYxRXRHUj87N/gOTZHzDr"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitEnxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoS3g//cUb3sHfAnr7MlJl7GRCEXo02oxGhm/LHkXFKSiwRaBOFE4Vz\r\n1pUyDBIfFLyDP+t5FRfIGwD+LeRP06i06O+YHhPxNy3k8vStUjsJGDAC6Hgr\r\nIHFQY8YwAYLRgcrrQxvgxdSJpd6FDcoD1cne0cEV2rziborzW+yjBIHwoz59\r\nOl07Krg2y1sapdgL5M/8Bd4wRLwxzREeC82L8/7J1PAE12c404MMX3Gu58Hj\r\nhVO9LkWRZdDo2pNHzWHgtITNHs0l1XuE5RvXKr1rYgtuuelGtGWfvGKpvyqJ\r\nrw2hQx4PTeKkMFeByqZ7QuFhgWdHEQZaLty+yXHQjtlB12mQeFBI0Rk+NxfK\r\nk/svD9l3E+0DAnxiXtTlIcCwCkyjMVcKPNc5U/GqseJhnlvGPGMgiyaZUpXK\r\nyKzSXsMO5CnHeSW2AXazDlYf+Ue/aERE0GCVtuqAMSYeIoPIQ7D70YoPecWi\r\nVtic4IV9EaxaGjkc1UkKDCloIH9Aba5uvTIg/xU+PujtebFMfuKwEoX/vVWo\r\norPYSJFWMdKJuM7rhWdpBqNHPs10AtYlzCYHV0U+qBQrKxNL8DNMhZRSfb95\r\n3hqjJ2vSX5Almn/fUxOwIbsTrhmGoBKktD3NiVkwWbJcIer1b2OSgpTYO9ib\r\nr1bgnzYtZm+ho81ZMavLqmLOobWo1q7/Ock=\r\n=u9rA\r\n-----END PGP SIGNATURE-----\r\n","size":3119,"noattachment":false,"key":"/@putout/plugin-convert-for-each-to-for-of/-/@putout/plugin-convert-for-each-to-for-of-7.1.2.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_7.1.2_1655982577278_0.9511308441345971"},"_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":1655982577478,"_cnpm_publish_time":1655982577478,"dist-tags":{"latest":"8.1.1"}}