xloem / stream-shift-promise

Resolves a promise to the next buffer/object from a stream

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stream-shift-promise

Resolves a promise to the next buffer/object in a stream's readable queue

npm install stream-shift-promise

Usage

var shift = require('stream-shift-promise')

console.log(await shift(someStream)) // first item from stream

Credit

Thanks @mafintosh for writing stream-shift on which this based.

License

MIT

About

Resolves a promise to the next buffer/object from a stream

License:MIT License


Languages

Language:JavaScript 100.0%