Skip to content

Pipe streams together with a more awesome syntax, like `a | b | c | pipe(process.stdout)`, duhh

Notifications You must be signed in to change notification settings

juliangruber/pipechain

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SYNOPSIS

A magical pipe chain

DESCRIPTION

Pipe streams together with a more awesome syntax, like a | b | c | pipe(process.stdout)

MOTIVATION

A hangover

var through = require('through')
var pipe = require('pipechain')()

var a = pipe(through(function(d) {
  this.queue(d.toString().toUpperCase())
}))

var b = pipe(through(function(d) {
  this.queue(d.split('-').join(','))
}))

var c = pipe(through(function(d) {
  this.queue(d.split(',').reverse().toString())
}))


a | b | c | pipe(process.stdout)

a.write('a-s-d-f') // OMG WTF? => F,D,S,A

About

Pipe streams together with a more awesome syntax, like `a | b | c | pipe(process.stdout)`, duhh

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published