HEX
Server: Apache/2.4.61 (Ubuntu)
System: Linux hosting106 7.0.12-1-pve #1 SMP PREEMPT_DYNAMIC PMX 7.0.12-1 (2026-06-09T21:07Z) x86_64
User: clinicadentalargarate.com (1193)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/nodejs/yapool/index.js
module.exports = Pool

function Pool () {
  this.length = 0
  this.head = null
  this.tail = null
}

Pool.prototype.add = function (data) {
  this.tail = new Item(data, this.tail, null)
  if (!this.head)
    this.head = this.tail
  this.length ++
}

Pool.prototype.remove = function (data) {
  if (this.length === 0)
    return

  var i = this.head.find(data)

  if (!i)
    return

  if (i === this.head)
    this.head = this.head.next

  if (i === this.tail)
    this.tail = this.tail.prev

  i.remove()
  this.length --
}

function Item (data, prev) {
  this.prev = prev
  if (prev)
    prev.next = this

  this.next = null
  this.data = data
}

Item.prototype.remove = function () {
  if (this.next)
    this.next.prev = this.prev
  if (this.prev)
    this.prev.next = this.next
  this.prev = this.next = this.data = null
}

Item.prototype.find = function (data) {
  return data === this.data ? this
  : this.next ? this.next.find(data)
  : null
}