1.1.8 • Published 1 month ago

object.entries v1.1.8

Weekly downloads
10,153,965
License
MIT
Repository
github
Last release
1 month ago

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

eslint-plugin-reacteslint-plugin-jsx-a11yeslint-config-airbnb-baseenzymeeslint-config-airbnbairbnb-js-shimsairbnb-prop-typeseasy-select-rn@fatihkydev/gatsby-source-datocmsreact-native-bluetooth2killi8n-react-native-fast-imagepipihomeuxp-es-linter@miot-plugin/util@tantei/util@icanpm/api-mastereslint-config-impetuseslint-config-impetus-lintsop-cdmbaf-lib-dev2@eaze/signupreact-native-template-rfbaseairscanairscan-example@wofh/eslint-config-wofhreact-native-esc-pos-sahaab@borisovart/atol-kkt-moduleclassactdeneme323112@ntt_app/react-native-custom-notificationpwc-code-generatorreact-native-covid-sdkgql_din_modplnt-tempmutasi-bca@saeon/quick-formreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutils@victor.accarini/ravendbwilscanner@oiti/documentoscopy-react-nativeeslint-config-globalorgquoc-test@infinitebrahmanuniverse/nolb-object_@saaspe/components@candidpartners/eslint-config@candidpartners/eslint-config-baseexpand-react-bridgeluminos-ui-coreeslint-config-bars-groupeslint-config-bars-group-basesklif-ui-kitsklif-api@everything-registry/sub-chunk-2365jawwy-sdkjawwy_gamification_release@deepakorg/test@deepak757/testreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-tablesklif-uimachinebeemrcapsreact-native-jawwy_samplemenyalatea021ec0lint-plugin-reactdynamics-contracts-xelvyelviraelm-filtelectron-promise-ipcelekdrex-eslint-plugin-millionjsdrop-menu-nav-bardskcoreneweslint-plugin-react-extendedeslint-plugin-react-zaloraeslint-plugin-simple-import-reacteslint-plugin-millionjs-drexeslint-config-episource-baseeslint-config-jcfeslint-config-jdeslint-config-jdsmarteslint-config-fittimeeslint-config-gceslint-config-mskcc-deveslint-config-solid-sodaeslint-config-paraply-baseeslint-config-paraply-reacteslint-config-pc-communicationeslint-config-starnavieslint-config-starnavi-reacteslint-plugin-jsx-no-inline-comment-textnodesestehsusueslint-config-dinaeslint-config-dina-base
1.1.8

1 month ago

1.1.7

8 months ago

1.1.6

1 year ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.4

7 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago