{"name":"@putout/plugin-convert-for-in-to-for-of","version":"1.1.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.1.0","_nodeVersion":"14.0.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ACpaQXpY4q0VW+ANEe/it77EcRa5onENLO5qhkkcnMOxWgpJE+hoo27fLH1IgRqCNaQ3PFsKQsyd0nRPN92AxA==","shasum":"36b8bc39112790974747cf954c0030966ae74d8b","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-for-in-to-for-of/download/@putout/plugin-convert-for-in-to-for-of-1.1.0.tgz","fileCount":14,"unpackedSize":6282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqFhhCRA9TVsSAnZWagAAQJUP/jpemeqQTqaYDXGHg+aZ\nHGhhAsiyKIJkttTSzx+WyeaRf/dPSrOF13lL2aC9oAWyAlk8ULlSpnywQrpA\n5iMtEU8N8iKXkPIbUDqsEx/PFjqfcEI+ms7xsW+9nnMFhNKbmJoMs0bzujXk\ndQL3nrd0voyo3Bnta1IO6JXu95tzsAM9OXrFRsoP/YjvCsvkyZhxfeHoZyfA\nkAKzwHqVDuoaE3VB+VY7o88ew7qdy0ozfzdj4I4ks8AjMAAtgkZTcpqpalIf\nJA5LcFAlL+qdVqOHxfKVSPTmIC++DgtzjQZ0hXQmmIGztduxAB3hYaDoj+E9\nSrpUruyMropvdeUwdQ1mOwsWmvEx5AdFLQKruSu6Xf3YXTsOJp0X6H8PVRYB\n2B5sfJgKixkvdsx8LHUp/EdI1JvaAniX7BCDWuKzOnsjr68BjmGz676/CFxe\ndgQNdL5nDl0H22zt/iYV2jXCls7lLCeygFP7pYtL9gv/v4rnn+RCpsFxDCQE\nHHnI5q0U+WxQMeBdBF31WYC3HMIzEdtiZ1Cmh9aORWiydgUd/m5DHn6RKC6b\n6mlx1pw9i8EYUr7FKAFN9OFBxo1ZGjqwF8H4KIGi80ZWCJIe1znny358NfPn\nMQW19bY88koSaO1K3sOGXPoe7BRjvdu1/VM8SWjGTyXNnEQ4Roa9E/2dhivo\nCbmW\r\n=LrSK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGN3WoWsFbuY2eSnMqzzWXKRhLutlVBgfRftMhnhH2F1AiAbbw713kEAsDcDppLybPBA52BhLIOOG0h3Ku3itsqILQ=="}],"size":2602,"noattachment":false,"key":"/@putout/plugin-convert-for-in-to-for-of/-/@putout/plugin-convert-for-in-to-for-of-1.1.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.1.0_1588090976842_0.5318129377324037"},"_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":1588090976971,"_cnpm_publish_time":1588090976971,"dist-tags":{"latest":"2.0.1"}}