Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
object.values
Advanced tools
Changelog
v1.1.1 - 2019-12-12
2a82dea
node
v12.7
, v11.15
, v10.16
, v8.16
, v6.17
; use nvm install-latest-npm
58a4209
npx aud
instead of nsp
or npm audit
with hoops 80080cd
e8a9297
es-abstract
(85% bundle size decrease) a8ac36f
eslint
, @ljharb/eslint-config
, functions-have-names
c74ad8a
object-keys
, tape
, eslint
10adf18
funding
field 110dbca
functions-have-names
40746e5
es-abstract
9b7c99b
Readme
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);
Simply clone the repo, npm install
, and run npm test
FAQs
ES2017 spec-compliant Object.values shim.
We found that object.values 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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).