git ssb

1+

Dominic / pull-stream-workshop



Tree: 079013977dd1a81caf9ed4717492ef3b9f722db0

Files: 079013977dd1a81caf9ed4717492ef3b9f722db0 / solutions / 09.js

291 bytesRaw
1
2var pull = require('pull-stream')
3var Split = require('pull-split')
4var toPull = require('stream-to-pull-stream')
5
6var pattern = new RegExp(process.argv[2])
7
8pull(
9 toPull.source(process.stdin),
10 Split(),
11 pull.filter(function (line) {
12 return pattern.exec(line)
13 }),
14 pull.log()
15)
16

Built with git-ssb-web