# pipe-pipefy

> Combine functions calling each function with the output of the last one

Latest version **1.1.0** (published 2022-03-04) · Apache-2.0 license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-03-04 |
| First published | 2022-03-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mathieu Decaffmeyer |
| Maintainers | mathieuprog |
| Keywords | pipe, pipeline, compose |

## Links

- npm: https://www.npmjs.com/package/pipe-pipefy
- Repository: https://github.com/mathieuprog/pipe-pipefy
- Homepage: https://github.com/mathieuprog/pipe-pipefy#readme
- Issues: https://github.com/mathieuprog/pipe-pipefy/issues
- npm.io page: https://npm.io/package/pipe-pipefy

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2022-03-04
- 1.0.0 — 2022-03-02

## README

# `pipe-pipefy`

`pipe-pipefy` allows to combine functions, calling each function with the output of the last one.

## Usage

```javascript
import { pipe } from 'pipe-pipefy';

const getName = (person) => person.name;
const uppercase = (string) => string.toUpperCase();

const person = { name: 'Mathieu' };

const result =
  pipe(
    getName,
    uppercase
  )(person);

expect(result).toBe('MATHIEU');
```

```javascript
import { pipe, pipefy } from 'pipe-pipefy';

const getName = (person) => person.name;
const uppercase = (string) => string.toUpperCase();
const repeat = (string, n) => string.repeat(n);

const person = { name: 'Mathieu' };

const result =
  pipe(
    getName,
    uppercase,
    pipefy(repeat, 2)
  )(person);

expect(result).toBe('MATHIEUMATHIEU');
```

## Installation

You can get `pipe-pipefy` via [npm](http://npmjs.com).

```bash
$ npm install pipe-pipefy --save
```

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