{"name":"@putout/plugin-convert-for-each-to-for-of","version":"1.4.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":"^1.13.0","coveralls":"^3.0.0","eslint":"^6.0.0","eslint-plugin-node":"^9.0.0","eslint-plugin-putout":"^1.3.1","madrun":"^2.0.0","nyc":"^14.0.0","putout":"^4.3.2","supertape":"^1.0.3"},"peerDependencies":{"putout":">=4.31"},"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@1.4.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-f0BMzZZysiqRgp8nz8se3qECMNF1rAJuAiweiPJlKwl4ttLyUW1DPgMrQ7QUUBDENX1t5Wib0cfF71ITfMassA==","shasum":"e78b80b7eeab9c71ba4f43dfd2d2d63ea2676639","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-for-each-to-for-of/download/@putout/plugin-convert-for-each-to-for-of-1.4.0.tgz","fileCount":4,"unpackedSize":6448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGejTCRA9TVsSAnZWagAAjbMP/RId3g9LPwmp/koGWcR1\njacH9B2Mjzt3H20276jhb5UlCRpWivTW9GtBR2ap9DMAHEhw+S3XTgg0SoTE\nrav2uN+j8Qy0uuCBHqvtS3IQy39colHVQ8iFWydTVI8GN+AfuMYr5rpUtFTd\noV3pHFaaiHjppNrWqAwtXiiUi3dkb4mTDcWuylu3tx2A0roW1DHL7L0KQ2MR\niR+5bEhH4LMSXGWyb0FIiYCYvluN0wOjBGOw7pRLHyAGATO7Xr3J9c6Hit+7\nI7f1mIZMffcLXzevCw3nbBwuzTCifHCX8RGf58psGTr/eQpnqp5s3aVgfRv9\nDm09q2PsVbDZCFIh9doOOwetyUEFzCnk/0MabJczSqdA165vfXGPo1WIeE13\nExgbCNRKaSImv/P0A+fv8GgFueT7NHwEy/CdRXhqPGYmQAKhLjbMLNl/mYiF\nofDtVaVLnbRB/f23HRIQo7ypq1hoeK8+CpHTRO4C5TFSQ2uRW5rCSjnOhHrX\ngcqkem6ElOO2vU4zPzp+S7o4rEybwvEOoFcsTXu3zfjtVnTj51BBYwpc/1X2\ns09RNoBHof/rwDFbz7Gx16AIT+F5xyTukO8+NNxpourpsnQD1Rc3855WKCFA\nwTSSETn0IvLBl1xyTCYz99QNU/7Yrc4w2Ov6ozCASr9DX/c6qYSE3sCe/1by\nH+W4\r\n=DLmo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/rrPyss0MzIcepT3TUosLU92iYzgAcogx1ztxY/9cDAIgbR9l0I0iaBV7pwNeQLIb9IfnpOz3zDu7px2R7Uu0RdY="}],"size":2620,"noattachment":false,"key":"/@putout/plugin-convert-for-each-to-for-of/-/@putout/plugin-convert-for-each-to-for-of-1.4.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_1.4.0_1561979091025_0.6898229809806162"},"_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":1561979091153,"_cnpm_publish_time":1561979091153,"dist-tags":{"latest":"8.1.1"}}