PHP 8.2.30
Preview: lazyProperty.js Size: 532 B
//lib/node_modules/npm/node_modules/lazy-property/lazyProperty.js

"use strict"

function addLazyProperty(object, name, initializer, enumerable) {
  Object.defineProperty(object, name, {
    get: function() {
      var v = initializer.call(this)
      Object.defineProperty(this, name, { value: v, enumerable: !!enumerable, writable: true })
      return v
    },
    set: function(v) {
      Object.defineProperty(this, name, { value: v, enumerable: !!enumerable, writable: true })
      return v
    },
    enumerable: !!enumerable,
    configurable: true
  })
}

module.exports = addLazyProperty

Directory Contents

Dirs: 0 × Files: 6

Name Size Perms Modified Actions
105 B lrw-r--r-- 2021-03-10 14:36:38
Edit Download
177 B lrw-r--r-- 2021-03-10 14:36:38
Edit Download
532 B lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.06 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.47 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
806 B lrw-r--r-- 2021-03-10 14:36:38
Edit Download

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