mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +00:00
17 lines
392 B
JavaScript
17 lines
392 B
JavaScript
|
|
//getting stack overflows from writing too fast.
|
|
//I think it's because there is a recursive loop
|
|
//which stacks up there are many write that don't drain.
|
|
//try to reproduce it.
|
|
var pull = require('pull-stream')
|
|
var through = require('through')
|
|
var toPull = require('../')
|
|
|
|
pull(
|
|
pull.count(1000000),
|
|
pull.map(function (e) {
|
|
return e.toString()+'\n'
|
|
}),
|
|
toPull.sink(through())
|
|
)
|