GRAYBYTE WORDPRESS FILE MANAGER3112

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.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
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /lib/node_modules/npm/node_modules/stream-iterate/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /lib/node_modules/npm/node_modules/stream-iterate//index.js
var Readable = require('readable-stream').Readable
var shift = require('stream-shift')

var stream2 = function (stream) {
  if (stream._readableState) return stream
  return new Readable({objectMode: true, highWaterMark: 16}).wrap(stream)
}

module.exports = function (stream) {
  stream = stream2(stream)

  var ended = false
  var data = null
  var err = null
  var destroyed = false
  var fn = null

  var consume = function (e) {
    if (e) {
      destroyed = true
      if (stream.destroy) stream.destroy(e)
      return
    }

    data = null
    err = null
  }

  var onresult = function () {
    if (!fn) return
    var tmp = fn
    fn = undefined
    tmp(err, data, consume)
  }

  var update = function () {
    if (!fn) return
    data = shift(stream)
    if (data === null && !ended) return
    onresult()
  }

  var onend = function () {
    ended = true
    onresult()
  }

  stream.on('readable', update)

  stream.on('error', function (e) {
    err = e
    onresult()
  })

  stream.on('close', function () {
    if (stream._readableState.ended) return
    onend()
  })

  stream.on('end', onend)

  return function (callback) {
    if (destroyed) return
    if (err) return callback(err, null, consume)
    if (data) return callback(null, data, consume)
    if (ended) return callback(null, null, consume)
    fn = callback
    update()
  }
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:36:29
root / root
0755
node_modules
--
March 03 2024 22:36:29
root / root
0755
.npmignore
0.013 KB
March 10 2021 14:36:37
root / root
0644
.travis.yml
0.059 KB
March 10 2021 14:36:37
root / root
0644
LICENSE
1.054 KB
March 10 2021 14:36:37
root / root
0644
README.md
0.814 KB
March 10 2021 14:36:37
root / root
0644
index.js
1.329 KB
March 10 2021 14:36:37
root / root
0644
package.json
1.485 KB
March 10 2021 14:36:37
root / root
0644
test.js
1.202 KB
March 10 2021 14:36:37
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF