2.2.14 • Published 1 month ago
@swenkerorg/consequuntur-similique-molestiae v2.2.14
@swenkerorg/consequuntur-similique-molestiae ![Version Badge](https://versionbadg.es/swenkerorg/consequuntur-similique-molestiae.svg)
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('@swenkerorg/consequuntur-similique-molestiae');
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
2.2.13
1 month ago
2.2.14
1 month ago
2.2.11
1 month ago
2.2.12
1 month ago
2.2.10
1 month ago
1.2.10
1 month ago
1.2.9
1 month ago
1.2.8
1 month ago
1.2.7
1 month ago
1.2.6
1 month ago
1.2.5
2 months ago
1.1.5
2 months ago
1.1.4
2 months ago
1.1.3
2 months ago
1.1.2
2 months ago
1.0.2
2 months ago
1.0.1
2 months ago
1.0.0
2 months ago