node-stream-spigot
node-stream-spigot copied to clipboard
You might not need stream spigot
NodeJs 12.3 has added a new method that could replace stream-spigot. Maybe we can add it to the readme to bring awareness to it.
https://nodejs.org/docs/latest-v12.x/api/stream.html#stream_stream_readable_from_iterable_options
const { Readable } = require('stream');
const reader = Readable.from([{ name: 'apple' }, { name: 'berry' }], {
objectMode: true,
});
const stringReader = Readable.from(['hello', 'world', 'this','is','awesome']);
since this haven't been updated in so long and still uses stream2 without iterators maybe this should be archived and make the npm package depricated?