# @kysley/js-pipe

> Compose N sequence of operations, giving the output as an input for the next operation.

Latest version **1.0.1** (published 2018-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kysley/js-pipe
pnpm add @kysley/js-pipe
yarn add @kysley/js-pipe
bun add @kysley/js-pipe
```

## 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 | 2018-07-25 |
| First published | 2018-07-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 0 |
| Unpacked size | 2.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Evan Kysley |
| Maintainers | kysley |
| Keywords | compose, function-composition, pipe, pipeline, chaining, function, sequence |

## Links

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

## 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.0.1 (latest) — 2018-07-25
- 1.0.0 — 2018-07-25

## README

# js-pipe

> Compose over functions to help create negative code

Compose N sequence of operations, giving the output as an input for the next operation.


## Install

```
$ npm install @kysley/js-pipe
```
```
$ yarn add @kysley/js-pipe
```


## Usage

```js
import pipe from '@kysley/js-pipe'

const capatalize = txt => txt.toUpperCase()
const addNum = txt => `${txt}1`
const res = pipe(capatalize, addNum)

console.log(res('Hello World')) //Hello World1
```


## API

### pipe(fn1, fn2, fn3, ...)

Returns the final value from the sequence of functions, using the output for the input of the next operation until finished.

#### fnx

Type: `Function`

Iterated over sequentially until the sequence is finished.

## License

MIT © [Evan Kysley](https://kysley.com)

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