1.2.0 • Published 3 months ago

object.values v1.2.0

Weekly downloads
14,388,522
License
MIT
Repository
github
Last release
3 months ago

object.values Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES2017 spec-compliant Object.values shim. Invoke its "shim" method to shim Object.values 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 values = require('object.values');

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

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

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

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

assert.deepEqual(Object.values(obj), expected);

Tests

Simply clone the repo, npm install, and run npm test

eslint-plugin-importjsx-ast-utilseslint-plugin-reactairbnb-js-shimsenzymeenzyme-adapter-react-16easy-select-rnvuedragdropuploadimagesreact-native-bluetooth2killi8n-react-native-fast-imagepipihomeleaf-react-dates@icanpm/api-master@arisageha/react-lazyload@arisageha/react-lazyload-fix@cashremit/cr-streamline-iconsjalali-support-react-dates@almeidaa/msecom-svgo@dubb/mickeyreact-native-template-rfbasecloud-archive-s3airscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-moduledeneme323112@fundefund/funde_ck@ntt_app/react-native-custom-notificationpwc-code-generatorreact-native-covid-sdkgql_din_mod@playnode/music-website@playnode/react-musicafryxiconsmutasi-bca@jttechnic/interpretertrezor-link-browser-extension@saeon/quick-formairbnb-react-datesmulti-billingmulti-checkoutreact-native-printer-brotherssubill-pricingsubillcheckoutdsloxonecheckout-subill@teachers/enzyme-adapter-react-16billing-subill@mkiloyan/renderer-reactreact-native-shekhar-bridge-testcogoportutilsuncoded-connect@victor.accarini/ravendbwilscanner@khalitovadel/abstract-repository@oiti/documentoscopy-react-native@playnode/react-music-components@respondea/cordova-plugin-v-inappbrowserquoc-test@infinitebrahmanuniverse/nolb-object_@saaspe/componentsexpand-react-bridgeopea-bootstraapluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-2365jawwy-sdkjawwy_gamification_release@skillx/react-dates@deepakorg/test@deepak757/testreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-tablesklif-uimachinebeemrcapsreact-native-jawwy_sampleginminegoogle-remakegriffin-ui-librarykrondolekumahadamangkoho-extensionknex-hookskatilatekasurbulukjusmelon204kintilidin15khaled-salem-custom-componentsklosokhc-extensionjualwkakarvickytea93kolapusang
1.2.0

3 months ago

1.1.7

9 months ago

1.1.6

2 years 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

8 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