{"name":"@putout/plugin-convert-for-each-to-for-of","version":"8.1.0","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","commitType":"colon","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-continue":"*","@putout/plugin-remove-useless-variables":"*","@putout/test":"^5.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":"c3a3745d8958a14cb52f2f0e2485945b4bfb9b1b","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-for-each-to-for-of@8.1.0","_nodeVersion":"18.13.0","_npmVersion":"9.1.3","dist":{"integrity":"sha512-XVv/7gTMzWQtUr3hM12GezJr1fTkcUzWwLueyJcayFlVDEuAME3X3fVn19XUKk801NA1RLRdtQiUmwuZj6lSZw==","shasum":"2db030f797c9d4c86134572aee0412cb9745c929","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.0.tgz","fileCount":4,"unpackedSize":8476,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBVWmlMIZC6DwRYgHj967CgNi+esgw+43zkDO4cSpXU8AiEAuob1rGbsb0qYC0BnsjS9Apw4BxDd0kwxjcGeo6KbTug="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2jzHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmozyg/8COF+0yX+CyQHgfBpfJTdaUyjWEdDzyudk85y/0fRx15TZyS+\r\nWQ9uls6SE3jDvPh8WhWrBlR/s1xt24rToz8IV4VNaS7Jv9mhs3PJRuehiYBf\r\nRnsdmbpSKla18C8RYg8moxK9ZNq7f0To+jk3KJZYOq94iVWGly/sbuZ5Tuko\r\nC2BB/cQelxmfiNda1izQnLigX7/GhvFf+r6bZWhXd5YyZ5Yz0hYhNo9uS4OB\r\ncFfS4P9jYhA6misjGPaxtNYqUdr84hazeJUuYSdKco3D2CWwpTCjzyrcXSan\r\nzIiNgecxzvj8jKK12ow1Qep0iqr83QAYbvM/ecZBwCDtrTfl0vhLWgfsn8/a\r\nvmh8Qc4d9C/gDvTjmND7PG2Xs2PuAP+/OIKa97IjXQ5g4DtODnu+m9+V8yHs\r\nmvd+/qZzC5uuLqeSgCKEFYojVY4T6BUIo0wCvdsHmkWbZnjNkcCLS9X9nuY4\r\npx6+dqLqzx4KHYF6Szl9ULyz29AQD4FdBqoFyDnAhatzK+el91V56FXfVObb\r\nuBKRgf6keWCeTIx7iuPL1SQUzoROc79Z5SnAOTPtcqZCK7CRBA6H0EN1kAFi\r\nrf1TjUfK9A3NfJsVdlzArEOs16LZ+HRu9aNoKhuzqxdrmEK1D/ETyR7QUCEk\r\nlhaaeYD9J7sTv5AuW1T9lCsoX/DfIFnXtOw=\r\n=YRuz\r\n-----END PGP SIGNATURE-----\r\n","size":3144,"noattachment":false,"key":"/@putout/plugin-convert-for-each-to-for-of/-/@putout/plugin-convert-for-each-to-for-of-8.1.0.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.0_1675246791362_0.5587677013817796"},"_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":1675246791484,"_cnpm_publish_time":1675246791484,"dist-tags":{"latest":"8.1.1"}}