{"_id":"@putout/plugin-convert-object-keys-to-object-entries","_rev":"4160173","name":"@putout/plugin-convert-object-keys-to-object-entries","description":"🐊Putout plugin adds ability to convert 'Object.keys()' to 'Object.entries()'","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:37:42.000Z","created":"2025-08-29T17:02:35.188Z","1.0.0":"2025-08-29T17:02:35.188Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"versions":{"1.0.0":{"name":"@putout/plugin-convert-object-keys-to-object-entries","version":"1.0.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to convert 'Object.keys()' to 'Object.entries()'","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-object-keys-to-object-entries#readme","main":"lib/convert-object-keys-to-object-entries.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","convert","const","let","var","VariableDeclaration"],"devDependencies":{"@putout/test":"^14.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^28.0.0","madrun":"^11.0.0"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-convert-object-keys-to-object-entries@1.0.0","gitHead":"949cb0daee17d30d0d3c900f4d9de52c88a77119","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"24.6.0","_npmVersion":"11.4.2","dist":{"shasum":"f3a3d67e619197f6ebfc5f772f1bb88e52e5a551","size":2051,"noattachment":false,"key":"/@putout/plugin-convert-object-keys-to-object-entries/-/@putout/plugin-convert-object-keys-to-object-entries-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-object-keys-to-object-entries/download/@putout/plugin-convert-object-keys-to-object-entries-1.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-npm-production","tmp":"tmp/plugin-convert-object-keys-to-object-entries_1.0.0_1756486955001_0.7236315419483197"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-29T17:02:35.188Z","publish_time":1756486955188,"_source_registry_name":"default","_cnpm_publish_time":1756486955188}},"readme":"# @putout/plugin-convert-object-keys-to-object-entries [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-object-keys-to-object-entries.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-object-entreis-to-object-keys \"npm\"\n\n> The `Object.keys()` static method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n>\n> (c) [`Object.keys()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys)\n\n> The `Object.entries()` static method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n>\n> (c) [`Object.entries()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries)\n\n????[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Object.entries()` to `Object.keys()`\n\n## Install\n\n```\nnpm i @putout/plugin-convert-object-keys-to-object-entries -D\n```\n\nCheckout in ????[**Putout Editor**](https://putout.cloudcmd.io/#/gist/82cf60991515c274d0ba08f2ca36e9e6/a56a4bddfb45007434f2d24e9573a3d7646ea11d).\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"convert-object-keys-to-object-entries\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nfor (const [key, value] of Object.keys(tokens)) {\n    console.log(key, value);\n}\n\nfor (const [key, value] of keys(tokens)) {\n    console.log(key, value);\n}\n```\n\n## ✅ Example of correct code\n\n```js\nfor (const [key, value] of Object.entries(tokens)) {\n    console.log(key, value);\n}\n\nfor (const [key, value] of Object.entries(tokens)) {\n    console.log(key, value);\n}\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-object-keys-to-object-entries#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}