# zippy

> zip() and zipWith() for Node.js!

Latest version **0.0.3** (published 2012-08-25) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2012-08-25 |
| First published | 2011-09-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joshua Holbrook |
| Maintainers | jesusabdullah |

## Links

- npm: https://www.npmjs.com/package/zippy
- Repository: git@github.com:jesusabdullah/node-zippy
- Homepage: https://github.com/jesusabdullah/node-zippy
- npm.io page: https://npm.io/package/zippy

## Recent versions

- 0.0.3 (latest) — 2012-08-25
- 0.0.2 — 2011-09-21
- 0.0.1 — 2011-09-21
- 0.0.0 — 2011-09-20

## README

# zippy

zippy is a tiny library that implements the `zip` and the more general `zipWith`. It was factored out of the "hempwick" project, since it's the only part of it I've used regularly and the project was too big for me to maintain.

# Install

    npm install zippy

# Methods:

### zip(xs, ys, ...)

Returns a list with elements (x_i, y_i, ...). For example:

    > zippy.zip([1, 2, 3], [1, 4, 9])
    [[1, 1], [2, 4], [3, 9]]

`zip` may take more than two arguments.

**protip:**

    > var transpose = function(a) { return zippy.zip.apply(null, M); };

### zipWith(fxn, xs, ys, ...)

`zipWith` is a more general form of `zip`, which takes a function that "does
something" with each set of x_i, y_i. In fact, `zip` is implemented with
`zipWith`! For an example:

    > zippy.zipWith(function(x,y) {return x+y;}, [1, 2, 3], [3, 2, 1])
    [4, 4, 4]

# Testing

    npm test

# Pull requests?

Why yes, I *would* be interested!

# License

MIT.

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