
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
recursively-keys
Advanced tools
Recursively-keys module for obtaining the keys in a Object recursively
Recursively-Keys
=====================================================
A simple library that helps you to get all the keys in an Object even DEEPLY.
npm install recursively-keys --save
var getKeys = require('recursively-keys');
var options = {recursive : true};
var object = {
a: 1,
b : 2,
c : [1,23,45],
d : {
x : 1,
a : 2,
v : [3,2,1,5]
},
e : [ 1, 'a', {f : 1}, [ {g : 1} ]]
}
var keys = getKeys(object, options);
// This will result in -- Keys : a,b,c,d,x,a,v,e,f,g
var keys = getKeys(object);
// This will result in -- Keys : a,b,c,d,e
getKeys(object, [options])
object - A JSON object
options - A JSON object which can include
recursive - (boolean) if true, it will return all the keys deeply. If false, it will only return the first level of keys.
(Other options will be included in further versions)
npm test
In lieu of a formal styleguide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.
* 0.1.0 Initial Release
FAQs
Recursively-keys module for obtaining the keys in a Object recursively
We found that recursively-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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.