
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.
Creates an array composed of the own enumerable property names(including nested) of an object.
Creates an array composed of the own enumerable property names(including nested) of an object.
Note: This kit works great with obj-parse (get and set object properties in a fast and elegant way).
$ npm install --save deep-keys
deepKeys(obj, intermediate[optional])
var deepKeys = require('deep-keys');
var obj1 = {
a: 1,
b: { c: 1 },
c: { d: { e: 1 }, f: 1 },
d: { e: { f: { g: 1, h: 2 } } },
e: 2,
f: { g: [] }
};
deepKeys(obj1);
//=> ['a', 'b.c', 'c.d.e', 'c.f', 'd.e.f.g', 'd.e.f.h', 'e', 'f.g']
var obj2 = {
type: 'customer',
details: {
name: 'Ariel', age: 26, address: { city: 'Tel Aviv', country: 'Israel' }
},
isActive: true
};
deepKeys(obj2);
//=> ['type', 'details.name', 'details.age', 'details.address.city', 'details.address.country', 'isActive']
// intermediate example
var obj3 = {a:{b:{c:1}}};
deepKeys(obj3); //=> [ 'a.b.c' ]
deepKeys(obj3, true); //=> [ 'a', 'a.b', 'a.b.c' ]
// Dots in key names get escaped
var obj4 = { 'a.': { b: 1} };
deepKeys(obj4) //=> [ 'a\\..b' ]
MIT © Ariel Mashraki
FAQs
Creates an array composed of the own enumerable property names(including nested) of an object.
The npm package deep-keys receives a total of 134,668 weekly downloads. As such, deep-keys popularity was classified as popular.
We found that deep-keys demonstrated a not healthy version release cadence and project activity because the last version was released 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
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.