🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

pipex

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pipex

simple function pipelining module that simplify the callback in nodejs

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
14
133.33%
Maintainers
1
Weekly downloads
 
Created
Source

pipex

simple function pipelining module that simplify the callback in nodejs

About

Install

npm install pipex --save

How to use

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();

Keywords

promise

FAQs

Package last updated on 05 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts