object.values (1.2.1)

Published 2026-02-24 14:02:06 +00:00 by atheaadmin

Installation

registry=
npm install object.values@1.2.1
"object.values": "1.2.1"

About this package

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

Dependencies

Dependencies

ID Version
call-bind ^1.0.8
call-bound ^1.0.3
define-properties ^1.2.1
es-object-atoms ^1.0.0

Development Dependencies

ID Version
@es-shims/api ^2.5.1
@ljharb/eslint-config ^21.1.1
array.prototype.map ^1.0.7
auto-changelog ^2.5.0
encoding ^0.1.13
eslint =8.8.0
functions-have-names ^1.2.3
has-strict-mode ^1.0.1
in-publish ^2.0.1
npmignore ^0.3.1
nyc ^10.3.2
object-keys ^1.1.1
safe-publish-latest ^2.0.0
tape ^5.9.0

Keywords

Object.values Object.keys Object.entries values ES7 ES8 ES2017 shim object keys entries polyfill es-shim API
Details
npm
2026-02-24 14:02:06 +00:00
0
Jordan Harband
MIT
latest
10 KiB
Assets (1)
Versions (1) View all
1.2.1 2026-02-24