Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heapwolf/pipe
Unix style pipes for nodejs streams `streamA | streamB | streamA`
https://github.com/heapwolf/pipe
Last synced: 5 days ago
JSON representation
Unix style pipes for nodejs streams `streamA | streamB | streamA`
- Host: GitHub
- URL: https://github.com/heapwolf/pipe
- Owner: heapwolf
- Created: 2013-08-08T20:34:44.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-24T22:17:12.000Z (over 8 years ago)
- Last Synced: 2024-04-14T09:03:22.576Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 46
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![build-status](https://www.codeship.io/projects/45c20710-4c8c-0131-15d5-5a8cd3f550f8/status)](https://www.codeship.io/projects/11261)
# SYNOPSIS
Provides pipes by operator instead of a chain.# DESCRIPTION
Pipe streams together with a simpler syntax, like `a | b | c`# EXAMPLES
`pipe` does not require `through`, i just like using through.```js
var through = require('through')
require('pipe').install()var a = through(function(d) {
this.queue(d.toString().toUpperCase())
})var b = through(function(d) {
this.queue(d.split('-').join(','))
})var c = through(function(d) {
this.queue(d.split(',').reverse().toString())
})a | b | c | process.stdout
a.write('a-s-d-f') // OMG WTF? => F,D,S,A
```It is also possible to to install pipe directly by
requiring the `register` module which can be handy with ES6:```js
import 'pipe/register'// Instead of:
import pipe from 'pipe'
pipe.install()
```