-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Following is the code snippet I am running:
'use strict';
const streamifyArray = require('streamify-array');
let stream = streamifyArray([]);
stream.on('end', () => console.log('Done!'))
When streamifying an empty array, the stream never encounters the end
handler. But on adding data
handler as below, it encounters the stream end
handler.
'use strict';
const streamifyArray = require('streamify-array');
let stream = streamifyArray([]);
stream.on('data', () => {});
stream.on('end', () => console.log('Done!'));
I am not sure why it needs data
handler in to reach the end
handler. @rubensworks ,can you help me with this?