Registry / devops / babel-plugin-transform-es2017-object-entries

babel-plugin-transform-es2017-object-entries

JSON →
library0.0.5jsnpmunverified

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.

npm install babel-plugin-transform-es2017-object-entries
INSTALL
IMPORT
SIG · BABEL-PLUGIN-TRANS
B
babel-plugin-transform-es2017-object-entries
devopsjavascriptv0.0.5
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
// In .babelrc: { "plugins": ["transform-es2017-object-entries"] }
import plugin from 'babel-plugin-transform-es2017-object-entries'
This is a Babel plugin, not a runtime import. Configure via .babelrc or babel.config.js.

Shows Babel configuration and transformation of Object.entries and Object.values to ES5 inline functions.

// .babelrc { "plugins": ["transform-es2017-object-entries"] } // input.js const obj = { a: 1, b: 2 }; const entries = Object.entries(obj); const values = Object.values(obj); // output (transpiled) var _entries = function (obj) { var ownProps = Object.keys(obj); var i = ownProps.length; var resArray = new Array(i); while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]]; return resArray; }; var _values = function (obj) { var ownProps = Object.keys(obj); var i = ownProps.length; var resArray = new Array(i); while (i--) resArray[i] = obj[ownProps[i]]; return resArray; }; var entries = _entries(obj); var values = _values(obj);
Debug
Known issues
deprecatedPackage is deprecated; last release over 7 years ago, no updates for modern Babel 7+.
fix
Use @babel/preset-env with core-js or @babel/plugin-proposal-object-entries (via preset-env).
affects: >=0.0.0
gotchaOnly transforms call expressions directly on Object.entries/Object.values; not polyfilled if accessed via variable or prototype.
fix
Ensure calls are written as `Object.entries(obj)` not `const {entries} = Object; entries(obj)`.
affects: >=0.0.0
gotchaDoes not handle Symbol properties or non-enumerable properties; matches native Object.entries behavior.
fix
Accept limitation; use a more complete polyfill if needed.
affects: >=0.0.0
Errors
Common errors & fixes
Module build failed: Error: Plugin 0 specified in "../.babelrc" provided an invalid property of type "function".
Using the plugin name as default import in babel.config.js instead of string reference.
fix
Use string plugin name in plugins array, e.g., plugins: ['transform-es2017-object-entries']
ReferenceError: Object.entries is not defined
Plugin did not transform the call because it wasn't a direct call to Object.entries.
fix
Rewrite as direct call: Object.entries(obj) or use a different polyfill strategy.
Upgrade
Version history
0.0.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
babel-plugin-transform-es2017-object-entries — npm install babel-plugin-transform-es2017-object-entries · libregistry