You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This appears to have something to do with the relationship between how join is triggered, and how lines emits its final buffer. Here's a bit of sample code, and its output:
var Lazy = require('./lazy');
var l = new Lazy();
l.lines.join(function (x) { console.log(x); });
l.emit('data', 'abcdef');
l.emit('end');
I put logging lines at various points, which you'll see.
pushing last line
bucket emitting pipe event
join received pipe event
[]
bucket yielding final buffer on end event: "abcdef"
Those logging lines are:
lines pushing the last bit of data
bucket receiving and delegating the "pipe" event to its internal Lazy
join receiving the "pipe" event from bucket and calling its callback
My callback, printing an empty array.
bucket getting the "end" event and yielding the final buffer, too late for join, and the contents of that buffer.
I hope this is helpful in resolving the issue. I wasn't able to figure out a satisfactory solution myself.
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: