0.1.2 • Published 8 years ago

word-filter v0.1.2

Weekly downloads
88
License
MIT
Repository
github
Last release
8 years ago

word-filter

version status

Extract words from the input stream into another text stream.

中文介绍

Command line

npm i -g word-filter

wf -h

wf -n example/text
cat example/text | wf -n

API

const WordFilter = require('word-filter')

const fs = require('fs')

fs.createReadStream(__dirname + '/text')
  .pipe(WordFilter.ascii())
  .on('data', word => console.log(word))

Input

Don't repeat yourself.
笑相遇,似觉琼枝玉树相倚,暖日明霞光烂。
Do one thing and do it well.
在Node stream暴露的接口中,Readable和Writable分别需要实现_read和_write方法。

Output

Don
t
repeat
yourself
Do
one
thing
and
do
it
well
Node
stream
Readable
Writable
_read
_write
0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago