Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
lodash.forin
Advanced tools
The lodash.forin package is a utility library that provides a method for iterating over own and inherited enumerable properties of an object. It is part of the larger Lodash library, which is known for its utility functions for common programming tasks.
Iterate over object properties
This feature allows you to iterate over all enumerable properties of an object, including inherited properties. The provided function is invoked for each property.
const forIn = require('lodash.forin');
const object = { 'a': 1, 'b': 2, 'c': 3 };
forIn(object, function(value, key) {
console.log(key, value);
});
The for-own package is a utility for iterating over the own enumerable properties of an object. Unlike lodash.forin, it does not iterate over inherited properties, making it more focused on the object's own properties.
The object.entries package provides a method to return an array of a given object's own enumerable string-keyed property [key, value] pairs. It is a part of the ECMAScript 2017 standard and does not include inherited properties, similar to for-own.
The lodash method _.forIn
exported as a Node.js module.
Using npm:
$ {sudo -H} npm i -g npm
$ npm i --save lodash.forin
In Node.js:
var forIn = require('lodash.forin');
See the documentation or package source for more details.
FAQs
The lodash method `_.forIn` exported as a module.
The npm package lodash.forin receives a total of 176,664 weekly downloads. As such, lodash.forin popularity was classified as popular.
We found that lodash.forin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.