mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +00:00
27 lines
510 B
JavaScript
27 lines
510 B
JavaScript
var pull = require('pull-stream')
|
|
var fs = require('fs')
|
|
var tape = require('tape')
|
|
|
|
var toPullStream = require('../')
|
|
|
|
pull(
|
|
pull.values([
|
|
'hello\n',
|
|
' there\n'
|
|
]),
|
|
toPullStream(process.stdout)
|
|
)
|
|
|
|
tape('get end callback even with stdout', function (t) {
|
|
|
|
pull(
|
|
toPullStream(fs.createReadStream(__filename)),
|
|
pull.map(function (e) { return e.toString().toUpperCase() }),
|
|
toPullStream.sink(process.stdout, function (err) {
|
|
console.log('----END!')
|
|
t.end()
|
|
})
|
|
)
|
|
|
|
})
|