This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/bfj/src/stream.js
2019-08-11 20:48:02 +02:00

23 lines
504 B
JavaScript

'use strict'
const util = require('util')
const Readable = require('stream').Readable
const check = require('check-types')
util.inherits(BfjStream, Readable)
module.exports = BfjStream
function BfjStream (read, options) {
if (check.not.instanceStrict(this, BfjStream)) {
return new BfjStream(read)
}
check.assert.function(read, 'Invalid read implementation')
this._read = function () { // eslint-disable-line no-underscore-dangle
read()
}
return Readable.call(this, options)
}