{"name":"@putout/plugin-convert-for-in-to-for-of","version":"2.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"},"nyc":{"exclude":["*/**/*.spec.js","test",".*"]},"dependencies":{},"keywords":["putout","putout-plugin","plugin","convert","for-in","for-of"],"devDependencies":{"@putout/eslint-config":"^1.0.2","@putout/test":"^2.0.0","coveralls":"^3.0.0","eslint":"^7.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^5.0.1","madrun":"^7.0.0","nyc":"^15.0.1","supertape":"^2.0.0"},"peerDependencies":{"putout":">=9"},"license":"MIT","engines":{"node":">=10"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-for-in-to-for-of@2.0.0","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-uE9h/o30PMio2yP+YbaHWfce1n++5DyeuG05zHaaMIMX7/MkQM3B9nrWHp9u9TIdGqxTyu6J5AZ4cWwRRe9G3w==","shasum":"ff7bb297d7bc3184b0813a1adf54d1cd9f7486d7","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-for-in-to-for-of/download/@putout/plugin-convert-for-in-to-for-of-2.0.0.tgz","fileCount":6,"unpackedSize":5928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPbhpCRA9TVsSAnZWagAAucUP/RH1Bb5X50INvY7tU9x0\nh7T4Ev7ZDd6l9egqK2r6ZSGfSy7cVQKhwvXyIMVVkQ1Ri/fF3C7AaYNz97ni\n4NG0EtoilR1z4tJr9hS7G+W9qihvliiV1pCdfCQ5FfsHZw2mSUcPw9S0weV2\npUWxsQbKC6Zya2fGnoXkotUnn5XAD3PVYPlvNDV5b+0Q6fz7SwlJRBQwhq3p\nnZAmN3jksWvgDPpoL6Yi89Gk3PCjF19Nx+YB7Hf8u8qnihrqutGlEqTtog9k\nXBdpas/FaRZUoEK8BYClh8AZMgMmTEq+yUB7ar76egz3HOb9FpiGkOjwX8fb\n27jRsH26gAJ7Ux3K18b7t2JIGE8FRXxaXABHygOI5IIKpdFSsgAtc/pOQufk\n7awLMYx6TubZTQWaWgnUABEx6Z152aJNMzr/wrUtN7GXXazwSnjb9vImNgFF\nutAAgj55pXS5+G0op4fFZqdSDu8pqvQEKaOcwIg8e5DaagdRXJAveSoqDS1j\nEMDHTjsiLs8MZ9IzczmZ/+tNFY2DGwDUSMauF/lxBeOzHdBknovy6HQ6G5Hy\nX87hxGaahVYjGI6ObW9c78grE/c7WVSov3fgFrXdDCTZukJ2EvwDdpFEjq7z\nhFF7QLjWWgjeNpMnXR9RFGpGImbBq90iYKQe990ly1QxP0ftYwqr7FqWeuLf\ny27v\r\n=L/TE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYwlWHa8cBkg44ljtYZwgGYmbtlRdwOw/u8Y5Y74B0GAIhAJ6s3F6LRPYlDLGzbzQZQg8TgDjj5cydRMafEUtSjhtR"}],"size":2312,"noattachment":false,"key":"/@putout/plugin-convert-for-in-to-for-of/-/@putout/plugin-convert-for-in-to-for-of-2.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_2.0.0_1597880425161_0.6521472133900663"},"_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":1597880425349,"_cnpm_publish_time":1597880425349,"dist-tags":{"latest":"2.0.1"}}