✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server366.web-hosting.com ​🇻​♯➤ 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 67.223.118.204 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.36
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /lib/node_modules/npm/node_modules/call-limit//call-limit.js
'use strict'

const defaultMaxRunning = 50

const limit = module.exports = function (func, maxRunning) {
  const state = {running: 0, queue: []}
  if (!maxRunning) maxRunning = defaultMaxRunning
  return function limited () {
    const args = Array.prototype.slice.call(arguments)
    if (state.running >= maxRunning) {
      state.queue.push({obj: this, args})
    } else {
      callFunc(this, args)
    }
  }
  function callNext () {
    if (state.queue.length === 0) return
    const next = state.queue.shift()
    callFunc(next.obj, next.args)
  }
  function callFunc (obj, args) {
    const cb = typeof args[args.length - 1] === 'function' && args.pop()
    try {
      ++state.running
      func.apply(obj, args.concat(function () {
        --state.running
        process.nextTick(callNext)
        if (cb) process.nextTick(() => cb.apply(obj, arguments))
      }))
    } catch (err) {
      --state.running
      if (cb) process.nextTick(() => cb.call(obj, err))
      process.nextTick(callNext)
    }
  }
}

module.exports.method = function (classOrObj, method, maxRunning) {
  if (typeof classOrObj === 'function') {
    const func = classOrObj.prototype[method]
    classOrObj.prototype[method] = limit(func, maxRunning)
  } else {
    const func = classOrObj[method]
    classOrObj[method] = limit(func, maxRunning)
  }
}

module.exports.promise = function (func, maxRunning) {
  const state = {running: 0, queue: []}
  if (!maxRunning) maxRunning = defaultMaxRunning
  return function limited () {
    const args = Array.prototype.slice.call(arguments)
    if (state.running >= maxRunning) {
      return new Promise(resolve => {
        state.queue.push({resolve, obj: this, args})
      })
    } else {
      return callFunc(this, args)
    }
  }
  function callNext () {
    if (state.queue.length === 0) return
    const next = state.queue.shift()
    next.resolve(callFunc(next.obj, next.args))
  }
  function callFunc (obj, args) {
    return callFinally(() => {
      ++state.running
      return func.apply(obj, args)
    }, () => {
      --state.running
      process.nextTick(callNext)
    })
  }
  function callFinally (action, fin) {
    try {
      return Promise.resolve(action()).then(value => {
        fin()
        return value
      }, err => {
        fin()
        return Promise.reject(err)
      })
    } catch (err) {
      fin()
      return Promise.reject(err)
    }
  }
}

module.exports.promise.method = function (classOrObj, method, maxRunning) {
  if (typeof classOrObj === 'function') {
    const func = classOrObj.prototype[method]
    classOrObj.prototype[method] = limit.promise(func, maxRunning)
  } else {
    const func = classOrObj[method]
    classOrObj[method] = limit.promise(func, maxRunning)
  }
}


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
1 May 2025 12.38 PM
root / root
0755
CHANGELOG.md
0.604 KB
10 Mar 2021 2.36 PM
root / root
0644
LICENSE
0.706 KB
10 Mar 2021 2.36 PM
root / root
0644
README.md
2.125 KB
10 Mar 2021 2.36 PM
root / root
0644
call-limit.js
2.69 KB
10 Mar 2021 2.36 PM
root / root
0644
package.json
1.911 KB
10 Mar 2021 2.36 PM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF