UNPKG
event-stream
Version:
latest (4.0.1)
4.0.1
4.0.0
3.3.5
3.3.4
3.3.3
3.3.2
3.3.1
3.3.0
3.2.2
3.2.1
3.2.0
3.1.7
3.1.5
3.1.4
3.1.2
3.1.1
3.1.0
3.0.20
3.0.18
3.0.17
3.0.16
3.0.15
3.0.14
3.0.13
3.0.12
3.0.11
3.0.10
3.0.9
3.0.8
3.0.7
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.2.3
2.2.2
2.2.1
2.2.0
2.1.9
2.1.8
2.1.7
2.1.5
2.1.4
2.1.3
2.1.2
2.1.0
2.0.10
2.0.9
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.3.1
1.3.0
1.2.0
1.1.0
1.0.0
0.10.0
0.9.8
0.9.7
0.9.6
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
0.8.2
0.8.1
0.8.0
0.7.0
0.6.0
0.5.3
0.5.2
0.5.1
0.5.0
0.4.0
0.3.0
0.2.1
0.2.0
0.1.0
construct pipes of streams of events
github.com/dominictarr/event-stream
dominictarr/event-stream
event-stream
/
examples
/
map.js
15 lines
(13 loc)
•
328 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var
es = require(
'..'
) process.stdin .pipe(es.map(function (
data
, callback) {
for
(
var
i =
0
; i <
data
.length; i++) {
if
(
data
[i] ==
0x61
) {
data
[i] =
0x41
} } callback(
null
,
data
) })) .pipe(process.stdout)
// echo abcdabcd | node map.js
// AbcdAbcd