{"id":19194,"library":"babel-plugin-transform-es2017-object-entries","title":"Babel Plugin Transform ES2017 Object Entries","description":"Babel plugin (v0.0.5, last updated 2017) that replaces `Object.entries()` and `Object.values()` calls with ES5-compatible generated functions. Unlike alternatives that import core-js polyfills, this plugin inlines inline implementations. It only handles these two methods, not the full object spread or other ES2017 features. Use is discouraged in favor of modern @babel/preset-env with core-js or direct polyfill imports.","status":"deprecated","version":"0.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/christensson/babel-plugin-transform-es2017-object-entries","tags":["javascript"],"install":[{"cmd":"npm install babel-plugin-transform-es2017-object-entries","lang":"bash","label":"npm"},{"cmd":"yarn add babel-plugin-transform-es2017-object-entries","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-plugin-transform-es2017-object-entries","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This is a Babel plugin, not a runtime import. Configure via .babelrc or babel.config.js.","wrong":"import plugin from 'babel-plugin-transform-es2017-object-entries'","symbol":"plugin","correct":"// In .babelrc: { \"plugins\": [\"transform-es2017-object-entries\"] }"}],"quickstart":{"code":"// .babelrc\n{\n  \"plugins\": [\"transform-es2017-object-entries\"]\n}\n\n// input.js\nconst obj = { a: 1, b: 2 };\nconst entries = Object.entries(obj);\nconst values = Object.values(obj);\n\n// output (transpiled)\nvar _entries = function (obj) {\n  var ownProps = Object.keys(obj);\n  var i = ownProps.length;\n  var resArray = new Array(i);\n  while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]];\n  return resArray;\n};\nvar _values = function (obj) {\n  var ownProps = Object.keys(obj);\n  var i = ownProps.length;\n  var resArray = new Array(i);\n  while (i--) resArray[i] = obj[ownProps[i]];\n  return resArray;\n};\n\nvar entries = _entries(obj);\nvar values = _values(obj);","lang":"javascript","description":"Shows Babel configuration and transformation of Object.entries and Object.values to ES5 inline functions."},"warnings":[{"fix":"Use @babel/preset-env with core-js or @babel/plugin-proposal-object-entries (via preset-env).","message":"Package is deprecated; last release over 7 years ago, no updates for modern Babel 7+.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Ensure calls are written as `Object.entries(obj)` not `const {entries} = Object; entries(obj)`.","message":"Only transforms call expressions directly on Object.entries/Object.values; not polyfilled if accessed via variable or prototype.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Accept limitation; use a more complete polyfill if needed.","message":"Does not handle Symbol properties or non-enumerable properties; matches native Object.entries behavior.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use string plugin name in plugins array, e.g., plugins: ['transform-es2017-object-entries']","cause":"Using the plugin name as default import in babel.config.js instead of string reference.","error":"Module build failed: Error: Plugin 0 specified in \"../.babelrc\" provided an invalid property of type \"function\"."},{"fix":"Rewrite as direct call: Object.entries(obj) or use a different polyfill strategy.","cause":"Plugin did not transform the call because it wasn't a direct call to Object.entries.","error":"ReferenceError: Object.entries is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}