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

component-each

Package Overview
Dependencies
Maintainers
31
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

component-each

Array / object / string iteration utility

  • 0.2.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18K
decreased by-16.33%
Maintainers
31
Weekly downloads
 
Created
Source

each

Array / object / string iteration utility.

Installation

$ component install component/each

API

each(array, fn[, ctx])

Iterate an array:

each([1,2,3], function(num, i){
  
})

Optionally pass a context object:

each([1,2,3], function(num, i){

}, this)

each(object, fn[, ctx])

Iterate an object's key / value pairs:

each(conf, function(key, val){
  
})

Iterate an array-ish object (has numeric .length):

each(collection, function(val, i){
  
})

each(string, fn[, ctx])

Iterate a string's characters:

each('hello', function(c, i){
  
})

License

MIT

FAQs

Package last updated on 14 Jun 2015

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