# combine-arrays

> For people who hate for loops and want to iterate over multiple arrays with a single function

Latest version **1.0.2** (published 2015-03-12) · WTFPL license · 0 weekly downloads

## Install

```sh
npm install combine-arrays
pnpm add combine-arrays
yarn add combine-arrays
bun add combine-arrays
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-03-12 |
| First published | 2014-11-25 |
| Weekly downloads | 0 |
| License | WTFPL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | TehShrike |
| Maintainers | tehshrike |
| Keywords | array, functional |

## Links

- npm: https://www.npmjs.com/package/combine-arrays
- Repository: https://github.com/TehShrike/combine-arrays
- Issues: https://github.com/TehShrike/combine-arrays/issues
- npm.io page: https://npm.io/package/combine-arrays

## Recent versions

- 1.0.2 (latest) — 2015-03-12
- 1.0.1 — 2014-11-26
- 1.0.0 — 2014-11-25

## README

For loops are dumb.

When iterating over multiple arrays, you should be able to use forEach/map/etc.

Call this function to turn multiple arrays into one array.

```js
var combine = require('combine-arrays')

var ary1 = ['what', 'what', 'in', 'the', 'butt']
var ary2 = ['ho', 'hi', 'hup', 'hurr', 'HAH', '...huh?']

var output = combine({
	first: ary1,
	second: ary2
})

console.log(output)
// [ { first: 'what', second: 'ho' },
//   { first: 'what', second: 'hi' },
//   { first: 'in', second: 'hup' },
//   { first: 'the', second: 'hurr' },
//   { first: 'butt', second: 'HAH' },
//   { first: undefined, second: '...huh?' } ]
```

```js
var combine = require('combine-arrays')

var output = combine([
	['a', 'ax', 'app', 'ache', 'anger'],
	['b', 'be', 'bin'],
	['c', 'ci', 'cat', 'cool', 'chant']
])

console.log(output)
// [ { 0: 'a', 1: 'b', 2: 'c' },
//   { 0: 'ax', 1: 'be', 2: 'ci' },
//   { 0: 'app', 1: 'bin', 2: 'cat' },
//   { 0: 'ache', 1: undefined, 2: 'cool' },
//   { 0: 'anger', 1: undefined, 2: 'chant' } ]
```

License
======

[WTFPL](http://wtfpl2.com)

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