# p-pipe

> Compose promise-returning & async functions into a reusable pipeline

Latest version **4.0.0** (published 2021-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install p-pipe
pnpm add p-pipe
yarn add p-pipe
bun add p-pipe
```

## Health

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

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-04-08 |
| First published | 2016-10-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/p-pipe) |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 131 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | promise, pipe, pipeline, compose, composition, combine, flow, serial, functions, reusable, async, await, promises, bluebird |

## Links

- npm: https://www.npmjs.com/package/p-pipe
- Repository: https://github.com/sindresorhus/p-pipe
- Homepage: https://github.com/sindresorhus/p-pipe#readme
- Issues: https://github.com/sindresorhus/p-pipe/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/p-pipe

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-04-08
- 3.1.0 — 2020-05-16
- 3.0.0 — 2019-04-06
- 2.0.1 — 2019-03-18
- 2.0.0 — 2019-02-04
- 1.2.0 — 2017-07-29
- 1.1.0 — 2017-05-12
- 1.0.0 — 2016-10-21

## README

# p-pipe

> Compose promise-returning & async functions into a reusable pipeline

## Install

```
$ npm install p-pipe
```

## Usage

```js
import pPipe from 'p-pipe';

const addUnicorn = async string => `${string} Unicorn`;
const addRainbow = async string => `${string} Rainbow`;

const pipeline = pPipe(addUnicorn, addRainbow);

console.log(await pipeline('❤️'));
//=> '❤️ Unicorn Rainbow'
```

## API

### pPipe(input…)

The `input` functions are applied from left to right.

#### input

Type: `Function`

Expected to return a `Promise` or any value.

## Related

- [p-each-series](https://github.com/sindresorhus/p-each-series) - Iterate over promises serially
- [p-series](https://github.com/sindresorhus/p-series) - Run promise-returning & async functions in series
- [p-waterfall](https://github.com/sindresorhus/p-waterfall) - Run promise-returning & async functions in series, each passing its result to the next
- [More…](https://github.com/sindresorhus/promise-fun)

---

<div align="center">
	<b>
		<a href="https://tidelift.com/subscription/pkg/npm-p-pipe?utm_source=npm-p-pipe&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
	</b>
	<br>
	<sub>
		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
	</sub>
</div>

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