Swap-Aggregator-Subgraph/node_modules/stream-to-pull-stream/test/stack.js
Richa-iitr d211083153 Revert "Revert "added handler""
This reverts commit c36ee8c5ca.
2022-07-03 07:30:05 +05:30

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())
)