# object.entries

> ES2017 spec-compliant Object.entries shim.

Latest version **1.1.9** (published 2025-03-15) · MIT license · 0 weekly downloads

> **Native alternative:** Object.entries — Use native JavaScript (Node 7.0.0+) (https://developer.mozilla.orgGlobal_Objects/Object/entries)

## Install

```sh
npm install object.entries
pnpm add object.entries
yarn add object.entries
bun add object.entries
```

## Health

**Score 43/100 (D)** — status: stable.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.1.9 |
| Published | 2025-03-15 |
| First published | 2015-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/object.entries) |
| Module format | CommonJS |
| Node | >= 0.4 |
| Dependencies | 4 |
| Unpacked size | 32.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 59 |
| Author | Jordan Harband |
| Maintainers | ljharb |
| Keywords | Object.entries, Object.values, Object.keys, entries, values, ES7, ES8, ES2017, shim, object, keys, polyfill, es-shim API |

## Links

- npm: https://www.npmjs.com/package/object.entries
- Repository: https://github.com/es-shims/Object.entries
- Homepage: https://github.com/es-shims/Object.entries#readme
- Issues: https://github.com/es-shims/Object.entries/issues
- npm.io page: https://npm.io/package/object.entries

## Dependencies (4)

- [call-bind](https://npm.io/package/call-bind.md) ^1.0.8
- [call-bound](https://npm.io/package/call-bound.md) ^1.0.4
- [es-object-atoms](https://npm.io/package/es-object-atoms.md) ^1.1.1
- [define-properties](https://npm.io/package/define-properties.md) ^1.2.1

## Recent versions

- 1.1.9 (latest) — 2025-03-15
- 1.1.8 — 2024-03-18
- 1.1.7 — 2023-08-28
- 1.1.6 — 2022-11-06
- 1.1.5 — 2021-10-03
- 1.1.4 — 2021-05-26
- 1.1.3 — 2020-11-26
- 1.1.2 — 2020-05-20
- 1.1.1 — 2019-12-12
- 1.1.0 — 2019-01-01
- 1.0.4 — 2016-12-04
- 1.0.3 — 2015-10-06
- 1.0.2 — 2015-09-25
- 1.0.1 — 2015-09-21
- 1.0.0 — 2015-09-02

## README

# object.entries <sup>[![Version Badge][npm-version-svg]][package-url]</sup>

[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

[![npm badge][npm-badge-png]][package-url]

An ES2017 spec-compliant `Object.entries` shim. Invoke its "shim" method to shim `Object.entries` if it is unavailable or noncompliant.

This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://tc39.github.io/ecma262/#sec-object.entries).

Most common usage:
```js
var assert = require('assert');
var entries = require('object.entries');

var obj = { a: 1, b: 2, c: 3 };
var expected = [['a', 1], ['b', 2], ['c', 3]];

if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
	// for environments with Symbol support
	var sym = Symbol();
	obj[sym] = 4;
	obj.d = sym;
	expected.push(['d', sym]);
}

assert.deepEqual(entries(obj), expected);

if (!Object.entries) {
	entries.shim();
}

assert.deepEqual(Object.entries(obj), expected);
```

## Tests
Simply clone the repo, `npm install`, and run `npm test`

[package-url]: https://npmjs.com/package/object.entries
[npm-version-svg]: https://versionbadg.es/es-shims/Object.entries.svg
[deps-svg]: https://david-dm.org/es-shims/Object.entries.svg
[deps-url]: https://david-dm.org/es-shims/Object.entries
[dev-deps-svg]: https://david-dm.org/es-shims/Object.entries/dev-status.svg
[dev-deps-url]: https://david-dm.org/es-shims/Object.entries#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/object.entries.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/object.entries.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/object.entries.svg
[downloads-url]: https://npm-stat.com/charts.html?package=object.entries
[codecov-image]: https://codecov.io/gh/es-shims/Object.entries/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/es-shims/Object.entries/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Object.entries
[actions-url]: https://github.com/es-shims/Object.entries/actions

---
_Source: https://npm.io/package/object.entries · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
