# zip-array

> A javascript equivalent of Python's zip function

Latest version **1.0.1** (published 2016-02-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install zip-array
pnpm add zip-array
yarn add zip-array
bun add zip-array
```

## 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.1 |
| Published | 2016-02-12 |
| First published | 2016-01-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Vikram |
| Maintainers | vikramcse |
| Keywords | zip, combine, array, python, merge, longest, shortest |

## Links

- npm: https://www.npmjs.com/package/zip-array
- Repository: https://github.com/vikramcse/zip-array
- Homepage: https://github.com/vikramcse/zip-array#readme
- Issues: https://github.com/vikramcse/zip-array/issues
- npm.io page: https://npm.io/package/zip-array

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-02-12
- 1.0.0 — 2016-01-30

## README

# zip-array
A javascript equivalent of Python's zip function. Merges together the values of each of the arrays.

# Install
```sh
$ npm install --save zip-array
```

## Examples
```js
var zip = require('zip-array').zip;
var result = zip([1, 2], ['a', 'b']);
console.log(result); 
// -> [ [ 1, 'a' ], [ 2, 'b' ] ]

var zip = require('zip-array').zip_longest;
var result = zip([1, 2, 3], [1, 2], [11])
console.log(result); 
// -> [ [ 1, 1, 11 ], [ 2, 2, undefined ], [ 3, undefined, undefined ] ]
```

## Usage

#### `require('zip-array)([array]...).zip`

**Arguments**:
- `[array...]`: list of arrays

**Returns**: Returns a list of arrays, where the i-th array contains the i-th Pelement from each of the argument sequences.
The returned list is truncated in length to the length of the **shortest argument array**.

#### `require('zip-array)([array]...).zip_longest`

**Arguments**:
- `[array...]`: list of arrays

**Returns**: Returns a list of arrays, where the i-th array contains the i-th Pelement from each of the argument sequences.
The returned list is truncated in length to the length of the **longest argument array**, and adds **undefined** where match is not found

## License

&copy; 2016 vikram. MIT License

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