# component-each

> Array / object / string iteration utility

Latest version **0.2.6** (published 2015-06-14) · 0 weekly downloads

## Install

```sh
npm install component-each
pnpm add component-each
yarn add component-each
bun add component-each
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.6 |
| Published | 2015-06-14 |
| First published | 2014-02-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Maintainers | tootallnate, hughsk, trevorgerhardt, timaschew, tjholowaychuk, rauchg, retrofox, coreh, forbeslindesay, kelonye, mattmueller, yields, anthonyshort, jongleberry, ianstormtaylor, cristiandouce, swatinem, stagas, amasad, juliangruber, calvinfo, dominicbarnes, timoxley, jonathanong, queckezz, nami-doc, clintwood, thehydroimpulse, stephenmathieson, dfcreative, defunctzombie |

## Links

- npm: https://www.npmjs.com/package/component-each
- Repository: https://github.com/component/each
- Issues: https://github.com/component/each/issues
- npm.io page: https://npm.io/package/component-each

## Dependencies (2)

- [to-function](https://npm.io/package/to-function.md) 2.0.6
- [component-type](https://npm.io/package/component-type.md) 1.0.0

## Recent versions

- 0.2.6 (latest) — 2015-06-14
- 0.2.5 — 2014-07-07
- 0.2.4 — 2014-05-28
- 0.2.2 — 2014-02-26
- 1.0.0 — 2014-02-26
- 0.2.1 — 2014-02-20
- 0.2.0 — 2014-02-20

## README

# each

  Array / object / string iteration utility.

## Installation

    $ component install component/each

## API

### each(array, fn[, ctx])

  Iterate an array:

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

  Optionally pass a context object:

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

}, this)
```

### each(object, fn[, ctx])

  Iterate an object's key / value pairs:

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

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

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

### each(string, fn[, ctx])

  Iterate a string's characters:

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

# License

  MIT

---
_Source: https://npm.io/package/component-each · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
