# pipex

> simple function pipelining module that simplify the callback in nodejs

Latest version **0.0.6** (published 2016-09-09) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2016-09-09 |
| First published | 2016-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | fritzprix |
| Maintainers | fritzprix |
| Keywords | promise, promise.js, pipeline |

## Links

- npm: https://www.npmjs.com/package/pipex
- Repository: https://github.com/fritzprix/pipex
- Homepage: https://github.com/fritzprix/pipex#readme
- Issues: https://github.com/fritzprix/pipex/issues
- npm.io page: https://npm.io/package/pipex

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [unit.js](https://npm.io/package/unit.js.md) ^2.0.0

## 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

- 0.0.6 (latest) — 2016-09-09
- 0.0.5-rc — 2016-09-09
- 0.0.5 — 2016-09-09
- 0.0.4 — 2016-09-08
- 0.0.3 — 2016-09-07
- 0.0.2 — 2016-09-06
- 0.0.1 — 2016-09-05

## README

## pipex 

### About
> pipex (**pipe**d e**x**ecutor) is simple but powerful function chaining module inspired by promise, so it 
has similar figure to promise, however, it provides more flexibility for callback function.
and I believe it will bring us more leaner implementaion and great managability as well eventually.
 
1. support multiple arguments for resolve / reject function
2. consistant (resolve, reject) interface independent from the where the callback located.

### Install  
```shell
npm install pipex --save
```

### How to use    
  
```javascript
var pipex = require('pipex');

pipex(function start(ctx){
    console.log('start here and if successful call \'resolve\'');
    ctx.resolve('hello');
}).then(function (ctx, val){
    console.log(val);
    console.log('this will print hello');
    ctx.resolve(val + ' world');
}).then(function (ctx, val) {
    console.log(val);
    console.log('this will print hello world apparently');
    ctx.resolve(val, val + ' againe');
}).then(function (ctx, val0, val1) {
    console.log(val1);
    console.log('this will print hello world again');
    ctx.reject('hello');
}).then(function (ctx, val){
    console.log('this will skipped');
}).catch(function (ctx, val){
    console.log(val);
    console.log('this will print hello');
}).execute();
```

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