Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
object.entries
Advanced tools
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);
Simply clone the repo, npm install
, and run npm test
v1.1.4 - 2021-05-26
node/install
instead of node/run
; use codecov
action 502a2d7
f38243c
eslint
, @ljharb/eslint-config
, aud
, functions-have-names
, has-strict-mode
, tape
28b8c53
01eb2bc
e9455ce
eslint
, @ljharb/eslint-config
, aud
, auto-changelog
3f26a81
2447f74
propertyIsEnumerable
checks own-ness; remove has
a65ae8d
2465bef
array-map
for array.prototype.map
37d5157
eslint
, tape
3878db8
call-bind
, es-abstract
9ff20ec
prepublishOnly
script for npm 7+ 052d1ca
1e84c9c
es-abstract
65af70d
es-abstract
2a633ce
5f4a0c1
FAQs
ES2017 spec-compliant Object.entries shim.
We found that object.entries demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.