SILENT KILLERPanel

Current Path: > > lib > node_modules > npm > node_modules > stream-each > >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //lib/node_modules/npm/node_modules/stream-each//

NameTypeSizeLast ModifiedActions
.npmignore File 13 bytes March 10 2021 14:36:38.
.travis.yml File 62 bytes March 10 2021 14:36:38.
LICENSE File 1079 bytes March 10 2021 14:36:38.
README.md File 1012 bytes March 10 2021 14:36:38.
collaborators.md File 352 bytes March 10 2021 14:36:38.
index.js File 1019 bytes March 10 2021 14:36:38.
package.json File 1642 bytes March 10 2021 14:36:38.
test.js File 2079 bytes March 10 2021 14:36:38.

Reading File: //lib/node_modules/npm/node_modules/stream-each///index.js

var eos = require('end-of-stream')
var shift = require('stream-shift')

module.exports = each

function each (stream, fn, cb) {
  var want = true
  var error = null
  var ended = false
  var running = false
  var calling = false

  stream.on('readable', onreadable)
  onreadable()

  if (cb) eos(stream, {readable: true, writable: false}, done)
  return stream

  function done (err) {
    if (!error) error = err
    ended = true
    if (!running) cb(error)
  }

  function onreadable () {
    if (want) read()
  }

  function afterRead (err) {
    running = false

    if (err) {
      error = err
      if (ended) return cb(error)
      stream.destroy(err)
      return
    }
    if (ended) return cb(error)
    if (!calling) read()
  }

  function read () {
    while (!running && !ended) {
      want = false

      var data = shift(stream)
      if (data === null) {
        want = true
        return
      }

      running = true
      calling = true
      fn(data, afterRead)
      calling = false
    }
  }
}

SILENT KILLER Tool