PHP 8.2.30
Preview: once.js Size: 935 B
/home/byroehnu/easepay.easetack.com/node_modules/once/once.js

var wrappy = require('wrappy')
module.exports = wrappy(once)
module.exports.strict = wrappy(onceStrict)

once.proto = once(function () {
  Object.defineProperty(Function.prototype, 'once', {
    value: function () {
      return once(this)
    },
    configurable: true
  })

  Object.defineProperty(Function.prototype, 'onceStrict', {
    value: function () {
      return onceStrict(this)
    },
    configurable: true
  })
})

function once (fn) {
  var f = function () {
    if (f.called) return f.value
    f.called = true
    return f.value = fn.apply(this, arguments)
  }
  f.called = false
  return f
}

function onceStrict (fn) {
  var f = function () {
    if (f.called)
      throw new Error(f.onceError)
    f.called = true
    return f.value = fn.apply(this, arguments)
  }
  var name = fn.name || 'Function wrapped with `once`'
  f.onceError = name + " shouldn't be called more than once"
  f.called = false
  return f
}

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
127 B lr--r--r-- 2026-03-14 01:49:10
Edit Download
765 B lrw-r--r-- 2026-02-23 15:45:42
Edit Download
935 B lrw-r--r-- 2026-02-23 15:45:42
Edit Download
574 B lrw-r--r-- 2026-02-23 15:45:42
Edit Download
1.73 KB lrw-r--r-- 2026-02-23 15:45:42
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).