{"name":"@putout/plugin-convert-for-each-to-for-of","version":"7.0.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","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-remove-useless-variables":"*","@putout/test":"^4.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^13.0.0","madrun":"^8.0.1"},"peerDependencies":{"putout":">=24"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"gitHead":"791eaa062c1c1e2e6e07168903aaa12d48bff5f8","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-for-each-to-for-of@7.0.0","_nodeVersion":"16.13.2","_npmVersion":"8.3.0","dist":{"integrity":"sha512-EKOFhMsbDkTqZnqhiH7F2lCowyWjxtUh8i0APbT2tqyPPQnGdZLHSFQjDX5dW1fgeJAJmHgJucENma55vlx01w==","shasum":"df26aa382200c88f29862590e7fcba643b228c1b","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-for-each-to-for-of/download/@putout/plugin-convert-for-each-to-for-of-7.0.0.tgz","fileCount":4,"unpackedSize":7416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6c1HCRA9TVsSAnZWagAAXWMP/jxtUVf545oCCYtRcBVw\nIaRHhBj3AUyYyVITQnl69BeMSEhQT7TdlyBlOtJFaLwFrftigcwf132H8F0j\necjcHubIVi4jZSTV8xfnl9zVZlcwmS8fVljOxuEvvVvkyJvLXWE6BySnk6hf\nKq5fCgv6hunc4URepnfALp8AAXB1FRHWGIJNgfSa5+qkoqmjqyDvmeLqBwXq\nz+/K6yz90h/V8SviIkwA4XIfLzNQOhOXJd4SPw0GHwsLHaWK6MR6BtgAmZq/\nWsjlzxc9HO0D6y8YgRAaM0HWPoB85cuXEE7T+5txpgabT3l0t3u4kShPsvGN\n1RPx4dcbzMqk5J+tE0PHsmMMUmE9l+ekJP7UboGR+R9fH/POX6GQx6wQDLFG\nJBjCQ7S/YuPKzhRdmTuKL5om4zF9mrJszd/zCxxZRFsRwd5SkDwtmlC3hl++\nl+CKWDdYXt7IRMn9TgUaqO9EqunzTj1Y6RM9Io7VW0pMtDMvytx2ypqYRWsC\nQmlM7D8aeh1jXeVn9zhB7TulTkBVVZxV8k/Aj34CL7tyFKypyyqv0f5DSBZB\nYQCxHu24KxLIPSub/lNBY2TFlyHJdZRGGlOpSqnn+Hiy5PZYGH5pegLvLqse\nWmGDS+1t2/8mQBHTsLO6Z4BWxnhpBBjIzWv/CRlA1S8/ISOuRZX0UAog9ytV\nJ0GH\r\n=EQxB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFciuxjvYBOdPXm5yFj1u/qXS1ZKRD67cCL2RJU0TSDGAiEAj5wy2EdvYoWgVr1YEwvbytGsCM6vSN41SkCUneM0TWw="}],"size":2885,"noattachment":false,"key":"/@putout/plugin-convert-for-each-to-for-of/-/@putout/plugin-convert-for-each-to-for-of-7.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_7.0.0_1642712391034_0.6048020682972377"},"_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":1642712391175,"_cnpm_publish_time":1642712391175,"dist-tags":{"latest":"8.1.1"}}