const WritableStream = require('readable-stream').Writable const promiseToCallback = require('promise-to-callback') module.exports = createStreamSink function createStreamSink (asyncWriteFn, _opts) { return new AsyncWritableStream(asyncWriteFn, _opts) } class AsyncWritableStream extends WritableStream { constructor (asyncWriteFn, _opts) { const opts = Object.assign({ objectMode: true }, _opts) super(opts) this._asyncWriteFn = asyncWriteFn } // write from incomming stream to state _write (chunk, encoding, callback) { promiseToCallback(this._asyncWriteFn(chunk, encoding))(callback) } } git' href='https://phantom.tfcis.org/~lantw44/git/freebsd-ports' title='freebsd-ports Git repository'/>
aboutsummaryrefslogtreecommitdiffstats
path: root/x11/waybar
Commit message (Expand)AuthorAgeFilesLines
* devel/libfmt: Update to 6.1.0tobik2019-12-031-1/+1
* x11*: Add missing USES={gl,gnome,mate}tobik2019-11-081-1/+1
* devel/libfmt: Update to 6.0.0tobik2019-09-011-0/+1
* x11/waybar: update to 0.8.0jbeich2019-08-29