Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ndhoule/each

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndhoule/each

Iterate over a collection, invoking a function for each element.

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
162K
increased by10.72%
Maintainers
1
Weekly downloads
 
Created

What is @ndhoule/each?

@ndhoule/each is a utility library for iterating over arrays and objects. It provides a simple and consistent way to perform operations on each element of a collection.

What are @ndhoule/each's main functionalities?

Iterate over arrays

This feature allows you to iterate over each element in an array, providing access to both the value and the index of each element.

const each = require('@ndhoule/each');

const array = [1, 2, 3, 4];
each((value, index) => {
  console.log(`Index: ${index}, Value: ${value}`);
}, array);

Iterate over objects

This feature allows you to iterate over each property in an object, providing access to both the value and the key of each property.

const each = require('@ndhoule/each');

const object = { a: 1, b: 2, c: 3 };
each((value, key) => {
  console.log(`Key: ${key}, Value: ${value}`);
}, object);

Other packages similar to @ndhoule/each

Keywords

FAQs

Package last updated on 02 May 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc