codeql-action/node_modules/object.values
Henry Mercer ed9506bbaf Bump `eslint-plugin-import` to avoid vulnerability in dependency 2023-01-18 21:00:05 +00:00
..
test Update checked-in dependencies 2021-07-27 16:54:26 +00:00
.editorconfig Update checked-in dependencies 2021-07-27 16:54:26 +00:00
.eslintrc Bump `eslint-plugin-import` to avoid vulnerability in dependency 2023-01-18 21:00:05 +00:00
.nycrc Update checked-in dependencies 2021-07-27 16:54:26 +00:00
CHANGELOG.md Bump `eslint-plugin-import` to avoid vulnerability in dependency 2023-01-18 21:00:05 +00:00
LICENSE Regenerating node_modules 2020-09-14 10:42:37 +01:00
README.md Update checked-in dependencies 2021-07-27 16:54:26 +00:00
auto.js Regenerating node_modules 2020-09-14 10:42:37 +01:00
implementation.js Bump `eslint-plugin-import` to avoid vulnerability in dependency 2023-01-18 21:00:05 +00:00
index.js Update checked-in dependencies 2021-07-27 16:54:26 +00:00
package.json Bump `eslint-plugin-import` to avoid vulnerability in dependency 2023-01-18 21:00:05 +00:00
polyfill.js Regenerating node_modules 2020-09-14 10:42:37 +01:00
shim.js Regenerating node_modules 2020-09-14 10:42:37 +01:00

README.md

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