{"name":"@putout/plugin-convert-for-each-to-for-of","version":"6.0.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":"^3.0.0","c8":"^7.5.0","eslint":"^7.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^7.0.0","madrun":"^8.0.1"},"peerDependencies":{"putout":">=15"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-for-each-to-for-of@6.0.0","_nodeVersion":"15.11.0","_npmVersion":"7.6.0","dist":{"integrity":"sha512-DCtlpgKNvsnj6KcoC6YaLeAacIoY9VfcH45fmN34bGoJXhj3cSYbSZ0ELDJ5Bs83qoyGw9+1SSC3Z+VmBa5rFA==","shasum":"92116633709b263aaf3c4ac5e00c8a21519fa551","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-for-each-to-for-of/download/@putout/plugin-convert-for-each-to-for-of-6.0.0.tgz","fileCount":4,"unpackedSize":7130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWgjrCRA9TVsSAnZWagAAxTkP/jxG9qwTf4aUi3JS/Skv\nOULES3z5gafzdUyllUk34KIoJzQG9l+qmldYZEI/j6nXWK1jLEV5JkD60fu2\nBin4qGunbfGmNVbinNKt1tV7aNHticqLBgbsegjMKwBuIIFsMmBI+Ba7tsZe\njjbFT+vd1+ujlwYGXoNBMN4Dlr8y7Kn9yszRjmSW75mQKUXqO6q5BCtinH5Q\naIw50htfkDQGNWf13y1ePmI3jJivMnPGss+1hAEgs+qAF1m1IyYyM6ToRYXS\ntBdthA2BRGCMupChIWbW9JDz2inNNr4/oSNKQY+ZWsQpcVokTFDDa8iWEY43\n4mmYEFwdQjcTWdKQZtnZuU/BWIBJpbJP2m+4XdvJl4OqWwKP3tdzthDb/bg/\nkUq5CC2E2ciSuBQ1Xej2OKkPL+76fr2pU8F5oXftRz7DfFkKGHLVAts3IzwC\nIklg67878dfIslX+iZORLlMy97kprY/6QE4Ttx3ih3jF4tdo31HPQbpkHQDD\n2Ci/ZaA9UbqvxtX9TcV/r5vEDTk7wUAz9UL5cRxm0OBAmIi/Ma/YrvkfyySy\nX4Rw00Ia7DyMEFvfUT4Ya0qnCML/RI/1GHtk4aO6qas5519Hy/cniS6gG7WW\nLhWwPXTbviiyI5fE04b16zUbU2iE22aCi+9lfM/Zc77khF2qRybYvBOG2b2R\n7UGf\r\n=lZtI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXh1YE23hhJJEd3HGcqqSq4bcRiuMzMAA5ax3W/gYYrAiBB7yPUZMycdLFh+My8BCEcdlfm5+9LfP5CQlW4JaQqMA=="}],"size":2814,"noattachment":false,"key":"/@putout/plugin-convert-for-each-to-for-of/-/@putout/plugin-convert-for-each-to-for-of-6.0.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_6.0.0_1616513258537_0.5505786555177559"},"_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":1616513258676,"_cnpm_publish_time":1616513258676,"dist-tags":{"latest":"8.1.1"}}