
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
reflect.ownkeys
Advanced tools
An ES2015 spec-compliant Reflect.ownKeys
shim. Invoke its "shim" method to shim Reflect.ownKeys
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 ownKeys = require('reflect.ownkeys');
var obj = { a: 1, b: 2, c: 3 };
var expected = ['a', 'b', 'c'];
if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
// for environments with Symbol support
var sym = Symbol();
obj[sym] = 4;
obj.d = sym;
expected.push(sym, 'd');
}
assert.deepEqual(ownKeys(obj), expected);
if (!Reflect.ownKeys) {
ownKeys.shim();
}
assert.deepEqual(Reflect.ownKeys(obj), expected);
Simply clone the repo, npm install
, and run npm test
v1.1.5 - 2024-12-29
409aed3
@es-shims/api
, @ljharb/eslint-config
, auto-changelog
, has-symbols
, npmignore
, tape
26459fa
call-bind
, define-properties
, es-abstract
, es-set-tostringtag
, globalthis
01e75d0
own-keys
8726824
es-abstract
, own-keys
68cfc76
engines.node
36fecb9
aud
with npm audit
1f3cca2
f00ecf4
FAQs
ES2015 spec-compliant shim for Reflect.ownKeys
The npm package reflect.ownkeys receives a total of 751,981 weekly downloads. As such, reflect.ownkeys popularity was classified as popular.
We found that reflect.ownkeys demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.