Detalhes do pacote

object.entries

es-shims110.8mMIT1.1.9

ES2017 spec-compliant Object.entries shim.

Object.entries, Object.values, Object.keys, entries

readme (leia-me)

object.entries Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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 interface. It works in an ES3-supported environment and complies with the spec.

Most common usage:

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

changelog (log de mudanças)

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.1.9 - 2025-03-14

Commits

  • [actions] split out node 10-20, and 20+ 5ea5516
  • [Dev Deps] update @es-shims/api, @ljharb/eslint-config, array.prototype.map, auto-changelog, has-strict-mode, tape d2f5f11
  • [Deps] update call-bind, es-object-atoms 9e50a4b
  • [Refactor] use call-bound directly b44af77
  • [Tests] replace aud with npm audit 615e995
  • [Dev Deps] add missing peer dep b750b1a

v1.1.8 - 2024-03-18

Commits

  • [actions] remove redundant finisher 14a9f46
  • [Dev Deps] update array.prototype.map, aud, npmignore, tape eee9379
  • [Deps] update call-bind, define-properties 02bbe0d
  • [Refactor] use es-object-atoms instead of es-abstract dac98c9

v1.1.7 - 2023-08-27

Commits

  • [Dev Deps] update @es-shims/api, @ljharb/eslint-config, aud, tape f2edb13
  • [Deps] update define-properties, es-abstract 7b9daec

v1.1.6 - 2022-11-05

Commits

  • [actions] reuse common workflows e6dc177
  • [meta] use npmignore to autogenerate an npmignore file 76b4136
  • [Dev Deps] update eslint, @ljharb/eslint-config, @es-shims/api, safe-publish-latest, tape 2ab7fcd
  • [Dev Deps] update eslint, @ljharb/eslint-config, array.prototype.map, aud, auto-changelog, functions-have-names, tape 61a205e
  • [actions] update rebase action to use reusable workflow 3b886b0
  • [actions] update codecov uploader 6db30f8
  • [Deps] update define-properties, es-abstract fa0a9c9

v1.1.5 - 2021-10-03

Commits

  • [Dev Deps] update eslint, @ljharb/eslint-config, array.prototype.map, tape 3fa8e24
  • [Deps] update es-abstract 9288cc0
  • [Robustness] use call-bound Array.prototype.push e495b27
  • [meta] npmignore coverage output d16eb7d

v1.1.4 - 2021-05-26

Commits

  • [actions] use node/install instead of node/run; use codecov action 502a2d7
  • [meta] do not publish github action workflow files f38243c
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, functions-have-names, has-strict-mode, tape 28b8c53
  • [readme] fix repo URLs; remove travis badge 01eb2bc
  • [readme] add actions and codecov badges e9455ce
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog 3f26a81
  • [actions] update workflows 2447f74
  • [Refactor] propertyIsEnumerable checks own-ness; remove has a65ae8d
  • [actions] update workflows 2465bef
  • [Tests] swap array-map for array.prototype.map 37d5157
  • [Dev Deps] update eslint, tape 3878db8
  • [Deps] update call-bind, es-abstract 9ff20ec
  • [meta] use prepublishOnly script for npm 7+ 052d1ca
  • [Tests] increase coverage 1e84c9c
  • [Deps] update es-abstract 65af70d
  • [Deps] update es-abstract 2a633ce
  • [meta] gitignore coverage output 5f4a0c1

v1.1.3 - 2020-11-26

Commits

  • [Tests] migrate tests to Github Actions f9641aa
  • [Tests] add implementation test; run es-shim-api in postlint; use tape runner 7cd4184
  • [Tests] run nyc on all tests de597c9
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape f453127
  • [actions] add "Allow Edits" workflow 5b65ef6
  • [Deps] update es-abstract; use call-bind where applicable 339136d
  • [actions] switch Automatic Rebase workflow to pull_request_target event ef2df4d

v1.1.2 - 2020-05-20

Commits

  • [meta] add auto-changelog 29e2771
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape, functions-have-names; add safe-publish-latest f30dde0
  • [Refactor] use callBound instead of function-bind db94733
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape; add aud 124d3bb
  • [Fix] do not mutate the native function when present fffb674
  • [Dev Deps] update @ljharb/eslint-config, aud 5552db4
  • [Deps] update es-abstract bcf93d0
  • [meta] only run aud on prod deps 13c35c9
  • [Deps] update es-abstract 9374fed

v1.1.1 - 2019-12-12

Commits

  • [Tests] use shared travis-ci configs 576c8a7
  • [Tests] up to node v12.7, v11.15, v10.16, v8.16, v6.17; use nvm install-latest-npm 26c5a45
  • [actions] add automatic rebasing / merge commit blocking 3253bdf
  • [Dev Deps] update eslint, @ljharb/eslint-config, functions-have-names bf480ef
  • [Refactor] use split-up es-abstract (85% bundle size decrease) 3fd42b9
  • [Tests] use npx aud instead of nsp or npm audit with hoops 9bf7f7f
  • [meta] clean up scripts 908f4fd
  • [Dev Deps] update eslint, tape 213436c
  • [Tests] use functions-have-names 8cd5de5
  • [Deps] update es-abstract 3a2ca03

v1.1.0 - 2019-01-01

Fixed

  • Exclude test.html from the npm package. #12

Commits

v1.0.4 - 2016-12-04

Commits

  • [Dev Deps] update tape, jscs, nsp, eslint, @ljharb/eslint-config, @es-shims/api cf4a9cf
  • [Tests] up to node v7.2, v6.9, v4.6; improve test matrix. 281ccbd
  • [Dev Deps] update tape, jscs, nsp, eslint, @ljharb/eslint-config 33fb890
  • [Dev Deps] update jscs, nsp, eslint, @ljharb/eslint-config 7c1ea3f
  • [Dev Deps] update tape, jscs, nsp, eslint, @ljharb/eslint-config f9473c7
  • [Dev Deps] update jscs, nsp, eslint, @es-shims/api 1368a76
  • [Tests] up to v5.6, v4.3 7ad9976
  • [Dev Deps] update tape, jscs, nsp, eslint, @ljharb/eslint-config 6bf18dc
  • [Dev Deps] update jscs, eslint, @ljharb/eslint-config a45c239
  • [Dev Deps] update tape, jscs, nsp, eslint, @ljharb/eslint-config 13f7d10
  • [Tests] up to node v5.9, v4.4 261533c
  • [Dev Deps] update jscs 8dd7b5f
  • [Docs] update to reflect ES2017 inclusion. 7662206
  • [Tests] use pretest/posttest for linting/security 87d62ad
  • [Tests] fix npm upgrades on older nodes 67cabde
  • [Tests] up to node v6.2 c50c154
  • [Dev Deps] update jscs, eslint, @ljharb/eslint-config ff17ab8
  • [Deps] update es-abstract b8be50a
  • [Deps] update es-abstract fb3a7e1
  • [Tests] on node v5.12 ba624ca
  • [Tests] on node v5.10 e513ca5
  • [Deps] update function-bind 6e25d29
  • [Deps] update es-abstract bf680a4
  • [Deps] update es-abstract fbb209b
  • [Deps] update define-properties 77d4ead
  • [Tests] on node v4.2 d946594
  • [Tests] on node v5.0 80d7d16

v1.0.3 - 2015-10-06

Commits

  • Add test case to cover non-enumerable keys made enumerable by a previous getter. 5b53808
  • [Dev Deps] update tape, eslint, @ljharb/eslint-config 1c3ddff
  • [Dev Deps] update jscs, eslint 0a0f1be
  • [Deps] update es-abstract 8cacfdc

v1.0.2 - 2015-09-25

Fixed

  • Not-yet-visited keys deleted on a [[Get]] must not show up in the output #1

v1.0.1 - 2015-09-21

Commits

  • [Tests] on iojs v3.3, up to node v4.1 181f888
  • [Dev Deps] update eslint, @ljharb/eslint-config e93536e
  • Add es-shim API keyword 51080c2
  • [Docs] update version badge URL 398a7e4

v1.0.0 - 2015-09-02

Commits