# boor

> The easy sync/async foreach

Latest version **0.0.4** (published 2020-02-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install boor
pnpm add boor
yarn add boor
bun add boor
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2020-02-15 |
| First published | 2018-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Francesco Bianco |
| Maintainers | francescobianco |

## Links

- npm: https://www.npmjs.com/package/boor
- Repository: https://github.com/javanile/boor
- Homepage: https://github.com/javanile/boor#readme
- Issues: https://github.com/javanile/boor/issues
- npm.io page: https://npm.io/package/boor

## Recent versions

- 0.0.4 (latest) — 2020-02-15
- 0.0.3 — 2019-11-20
- 0.0.2 — 2018-04-09

## README

# boor

**Warning!** This is not a polite library.

### (SYNC) Loop through **Array** items

```js
/**
 * Loop through values only
 */
let values = ['Apple', 'Banana', 'Cagaita']

foreach(values, (value) => {
    console.log('=>', value)    
})

// Output:
//=> Apple
//=> Banana
//=> Cagaita
```

```js
/**
 * Loop through key-value pairs
 */
let values = ['Apple', 'Banana', 'Cagaita']

foreach(values, (key, value) => {
    console.log(key, '=>', value)    
})

// Output:
//0 => "Apple"
//1 => "Banana"
//2 => "Cagaita"
```

### (ASYNC) Loop through **Array** items

```js
/**
 * Loop through values only
 */
let values = ['Apple', 'Banana', 'Cagaita']

foreach(values, (index, next) => {
    console.log('=>', value)
    next()
}).then(() => {
    console.log('=> --end--')
})

// Output:
//=> Apple
//=> Banana
//=> Cagaita
//=> --end--
```

```js
/**
 * Loop through key-value pairs
 */
let values = ['Apple', 'Banana', 'Cagaita']

foreach(values, (key, value) => {
    console.log(key, '=>', value)    
})

// Output:
//0 => "Apple"
//1 => "Banana"
//2 => "Cagaita"
```

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