{"name":"@putout/plugin-convert-for-in-to-for-of","version":"1.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to convert for-in to for-of","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-for-in-to-for-of.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","convert","for-in","for-of"],"devDependencies":{"@putout/eslint-config":"^1.0.2","@putout/test":"^1.13.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0","madrun":"^5.0.0","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=7.17"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-for-in-to-for-of@1.0.0","_nodeVersion":"13.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-VJycYT1xF44F036FCtyuKxS33dbYxPLstbug352mA6wQwyU70vEdSRPeb9jUlymjd+/S0A9ejq8XJbzrqnDn/Q==","shasum":"a21dac8173d1234b9ac42b26e41ecbc94488e869","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-for-in-to-for-of/download/@putout/plugin-convert-for-in-to-for-of-1.0.0.tgz","fileCount":10,"unpackedSize":5991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemuqhCRA9TVsSAnZWagAAn4YP/j+nt/OCUM34DMWJN9Cd\naiHpKpFJA7n910SCWKdqs2n5nUcIc8EVTHcAi+OMHnqNbX+v+iC17HGl23mm\nM24Y1PC1cxC/agobgW7ujjYircM+7oAzW3YANpMFPOASkyUSXCQs/DWuEuNf\n4Djkzg8AZkBLqGbjEBW1nDC9WsrpO/7/NJCdIwxBseOMri6BeRHZGP37svB6\nZEneHATUrs/1ypaxi3vn4EP4yPjqASR3Hm7Fo0uNWurT2or8DaATm+deZGtN\nY3aWiRPJVN/42SXXmO92TuWimuo7pS5xkNBmvca08zXAZq/UwsoLIiVdUevC\nkT4dsYo0suMSLk+JTF/dGsdT8Y51dhVKwTalscoKfVdr/GO/hhdKxbXNrUaj\nr1duNFhfIRAc39YTDTHHjsfA3XuohuAICFoIi7lw+bF16jpXcYlGLbcFoR2s\nReTzYXWYZsk9KF4Hi4Z65Izt9Bup82MtD0UVvYOpja8OxCJzCm29FM4TJPaL\n/FnTYFZb2aaggzZel3LX5YTkBtVnUwwXPGbxY7t7Dd2tvuoblQtmx3785uMV\ncQf6tPWN9ZNwBvFEq9JjHMI5N8sp6XYN0jFw76PShEn57JgZq6WkMIqG9rx5\nykrl4Fl5V1y/hK8N4QkrI21kFOlQoOUHlwSUnBPm/n9HF5fEFGV1FfAhT45x\nd0mw\r\n=owXL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAp0ovyaREgWm+AeDehdQ1ywGEmx51E20kYcTGuvkno3AiEAhbn1fVy4PcPOBFgjKhshBsCxfmjQ6HYzS5bTYsfQefg="}],"size":2443,"noattachment":false,"key":"/@putout/plugin-convert-for-in-to-for-of/-/@putout/plugin-convert-for-in-to-for-of-1.0.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-in-to-for-of_1.0.0_1587210912643_0.3620795552376075"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-convert-for-in-to-for-of [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-for-in-to-for-of.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-for-in-to-for-of \"npm\"\n\n> The [`for...in`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) statement iterates over all enumerable properties of an object that are keyed by strings.\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 `for...in` to `for...of` loop. 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-in-to-for-of -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"convert-for-in-to-for-of/positive\": \"on\",\n        \"convert-for-in-to-for-of/negative\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nfor (const item in object) {\n    if (object.hasOwnProperty(item)) {\n        log(item);\n    }\n}\n\nfor (const item in object) {\n    if (!object.hasOwnProperty(item))\n        continue;\n    \n    log(item);\n}\n```\n\n## ✅ Example of correct code\n\n```js\nfor (const item of Object.keys(object)) {\n    log(item);\n}\n```\n\n## License\n\nMIT\n","publish_time":1587210912837,"_cnpm_publish_time":1587210912837,"dist-tags":{"latest":"2.0.1"}}