How to use the readable-stream.Writable.prototype function in readable-stream

To help you get started, we’ve selected a few readable-stream examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github npm / fs-write-stream-atomic / index.js View on Github external
function end () {
    // We have to use our parent class directly because we suppress `finish`
    // events fired via our own emit method.
    Writable.prototype.emit.call(writeStream, 'finish')

    // Delay the close to provide the same temporal separation a physical
    // file operation would have– that is, the close event is emitted only
    // after the async close operation completes.
    setImmediate(function () {
      writeStream.emit('close')
    })
  }
}
github davidhealey / waistline / node_modules / npm / node_modules / fs-write-stream-atomic / index.js View on Github external
function end () {
    // We have to use our parent class directly because we suppress `finish`
    // events fired via our own emit method.
    Writable.prototype.emit.call(writeStream, 'finish')

    // Delay the close to provide the same temporal separation a physical
    // file operation would have– that is, the close event is emitted only
    // after the async close operation completes.
    setImmediate(function () {
      writeStream.emit('close')
    })
  }
}
github sx1989827 / DOClever / Desktop / node_modules / fs-write-stream-atomic / index.js View on Github external
function end () {
    // We have to use our parent class directly because we suppress `finish`
    // events fired via our own emit method.
    Writable.prototype.emit.call(writeStream, 'finish')

    // Delay the close to provide the same temporal separation a physical
    // file operation would have– that is, the close event is emitted only
    // after the async close operation completes.
    setImmediate(function () {
      writeStream.emit('close')
    })
  }
}
github chrahunt / TagProReplays / src / js / modules / replay-import-stream.js View on Github external
ObjectStream.prototype.write = function (chunk, encoding, cb) {
  logger.debug("ObjectStream#write: Received chunk.");
  var size = this._size(chunk);
  // Size of currently called write value + size of all buffered calls.
  this.length += size;
  // Disregard original return value.
  Writable.prototype.write.call(this, ...arguments);
  var ret = this.length < this.__highWaterMark;
  if (!ret) {
    logger.debug("ObjectStream#write: Need drain.");
    this._writableState.needDrain = true;
  }

  return ret;
};
github npm / fs-write-stream-atomic / index.js View on Github external
WriteStreamAtomic.prototype.emit = function (event) {
  if (event === 'finish') return this.__atomicStream.end()
  return Writable.prototype.emit.apply(this, arguments)
}
github davidhealey / waistline / node_modules / npm / node_modules / fs-write-stream-atomic / index.js View on Github external
WriteStreamAtomic.prototype.emit = function (event) {
  if (event === 'finish') return this.__atomicStream.end()
  return Writable.prototype.emit.apply(this, arguments)
}
github sx1989827 / DOClever / Desktop / node_modules / fs-write-stream-atomic / index.js View on Github external
WriteStreamAtomic.prototype.emit = function (event) {
  if (event === 'finish') return this.__atomicStream.end()
  return Writable.prototype.emit.apply(this, arguments)
}