{
  "_id": "define-lazy-prop",
  "maintainers": [
    {
      "name": "sindresorhus",
      "email": "sindresorhus@gmail.com"
    }
  ],
  "keywords": [
    "lazy",
    "property",
    "properties",
    "prop",
    "define",
    "object",
    "value",
    "lazily",
    "laziness",
    "evaluation",
    "eval",
    "execute",
    "getter",
    "function",
    "fn",
    "memoize",
    "cache",
    "defer",
    "deferred"
  ],
  "dist-tags": {
    "latest": "3.0.0"
  },
  "author": {
    "name": "Sindre Sorhus",
    "email": "sindresorhus@gmail.com",
    "url": "https://sindresorhus.com"
  },
  "_rev": "5-90de61f8e78910da87ff39f495005fda",
  "description": "Define a lazily evaluated property on an object",
  "readme": "# define-lazy-prop\n\n> Define a [lazily evaluated](https://en.wikipedia.org/wiki/Lazy_evaluation) property on an object\n\nUseful when the value of a property is expensive to generate, so you want to delay the computation until the property is needed. For example, improving startup performance by deferring nonessential operations.\n\n## Install\n\n```\n$ npm install define-lazy-prop\n```\n\n## Usage\n\n```js\nimport defineLazyProperty from 'define-lazy-prop';\n\nconst unicorn = {\n\t// …\n};\n\ndefineLazyProperty(unicorn, 'rainbow', () => expensiveComputation());\n\napp.on('user-action', () => {\n\tdoSomething(unicorn.rainbow);\n});\n```\n\n## API\n\n### defineLazyProperty(object, propertyName, valueGetter)\n\n#### object\n\nType: `object`\n\nObject to add the property to.\n\n#### propertyName\n\nType: `string`\n\nName of the property to add.\n\n#### valueGetter\n\nType: `Function`\n\nCalled the first time `propertyName` is accessed. Expected to return a value.\n\n## Related\n\n- [lazy-value](https://github.com/sindresorhus/lazy-value) - Create a lazily evaluated value\n- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily\n- [p-lazy](https://github.com/sindresorhus/p-lazy) - Create a lazy promise\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/sindresorhus/define-lazy-prop.git"
  },
  "bugs": {
    "url": "https://github.com/sindresorhus/define-lazy-prop/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "define-lazy-prop",
      "version": "1.0.0",
      "description": "Define a lazily evaluated property on an object",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/sindresorhus/define-lazy-prop.git"
      },
      "author": {
        "name": "Sindre Sorhus",
        "email": "sindresorhus@gmail.com",
        "url": "sindresorhus.com"
      },
      "engines": {
        "node": ">=4"
      },
      "scripts": {
        "test": "xo && ava"
      },
      "files": [
        "index.js"
      ],
      "keywords": [
        "lazy",
        "property",
        "properties",
        "prop",
        "define",
        "object",
        "obj",
        "value",
        "lazily",
        "laziness",
        "val",
        "evaluation",
        "eval",
        "execute",
        "getter",
        "function",
        "fn",
        "memoize",
        "cache",
        "defer",
        "deferred"
      ],
      "devDependencies": {
        "ava": "*",
        "xo": "*"
      },
      "gitHead": "8077e201f5e9a269ab686873bca03b0a41719b26",
      "bugs": {
        "url": "https://github.com/sindresorhus/define-lazy-prop/issues"
      },
      "homepage": "https://github.com/sindresorhus/define-lazy-prop#readme",
      "_id": "define-lazy-prop@1.0.0",
      "_shasum": "c9f83eabd8f2ce19e916f59ca68c06a2d175f210",
      "_from": ".",
      "_npmVersion": "3.10.8",
      "_nodeVersion": "6.9.1",
      "_npmUser": {
        "name": "sindresorhus",
        "email": "sindresorhus@gmail.com"
      },
      "dist": {
        "shasum": "c9f83eabd8f2ce19e916f59ca68c06a2d175f210",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/define-lazy-prop/-/define-lazy-prop-1.0.0.tgz",
        "integrity": "sha512-CnLAc0n1gVX1zH/MnMmf/ar0ZKb+HFslZAgnf0n6soB2w7I4gjqC29i2f5KDVZ3lKxrdScDRAuF1kNSXPvgPxQ==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQDW2nttKgrH7AzMJEce5NN2hlgcJcmqkUuimmcm+NZBwQIgM81VksV2QSaXhFnNkPeykBzs5v9YQqPTTAN43LrfTG4="
          }
        ]
      },
      "maintainers": [
        {
          "name": "sindresorhus",
          "email": "sindresorhus@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "packages-18-east.internal.npmjs.com",
        "tmp": "tmp/define-lazy-prop-1.0.0.tgz_1484489889934_0.29690037947148085"
      },
      "directories": {}
    },
    "2.0.0": {
      "name": "define-lazy-prop",
      "version": "2.0.0",
      "description": "Define a lazily evaluated property on an object",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/sindresorhus/define-lazy-prop.git"
      },
      "author": {
        "name": "Sindre Sorhus",
        "email": "sindresorhus@gmail.com",
        "url": "sindresorhus.com"
      },
      "engines": {
        "node": ">=8"
      },
      "scripts": {
        "test": "xo && ava && tsd"
      },
      "keywords": [
        "lazy",
        "property",
        "properties",
        "prop",
        "define",
        "object",
        "value",
        "lazily",
        "laziness",
        "evaluation",
        "eval",
        "execute",
        "getter",
        "function",
        "fn",
        "memoize",
        "cache",
        "defer",
        "deferred"
      ],
      "devDependencies": {
        "ava": "^1.4.1",
        "tsd": "^0.7.2",
        "xo": "^0.24.0"
      },
      "gitHead": "32b6a49111ccf65e2d4a07c0d8e6d2c9bef78c90",
      "bugs": {
        "url": "https://github.com/sindresorhus/define-lazy-prop/issues"
      },
      "homepage": "https://github.com/sindresorhus/define-lazy-prop#readme",
      "_id": "define-lazy-prop@2.0.0",
      "_npmVersion": "6.4.1",
      "_nodeVersion": "10.15.1",
      "_npmUser": {
        "name": "sindresorhus",
        "email": "sindresorhus@gmail.com"
      },
      "dist": {
        "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
        "shasum": "3f7ae421129bcaaac9bc74905c98a0009ec9ee7f",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
        "fileCount": 5,
        "unpackedSize": 4446,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrataCRA9TVsSAnZWagAA5x4P/2DGU+J6DKSX2+75RZVi\nu4YzMpoTg9aykAny7ezprTxRwM5W+PxTUcjJ+en3Rxzixze3yyIBYt/v+v2o\n1ZOF9d7bMxtXKGIS1VZhfmJobHqgWFOwsAjG3tyEn8cpXX8aCS33mDdXAwKx\ntJPWd/DHzK39x++qhT/rkvfp6u67W62Hnu2QQ9CWHmtigRlmNyhD5Z6/iHEc\nBHooxBJu3NOCha7DNHj/kjNvWdjAHBYSFw/YMfDtj2Esi8Om2X4m7QE1fFPq\nj09vCu+OUW4zyOV8CuSQtRpZRI5LPe8r+X9sClFifcN8B6uIvSkCk8r3zEf9\nl7aLdOZPPC2oxgxNxaBM03kgWhrb6TNXC8jPFIi8E01PYBjlRP564+CATx+I\nR6DABaIqj2Yx5xCACmxm1jBOBTPbnneoe6bErwUGH3qj6GIDnr/WiHcxbR/v\ngRHDMVzhelD/FnfXUMc5r9ykPx8SxSMGybGc/Fbx1KFM6kVS4pk7+SdjD5PG\nmD/Y2zVrtvnlRr64AwAeP0PPwQqmYpisxZnMutMYesNmPVLxaWLSi3C8bDdP\nLJ26i9cD5CIZ7I6qO1VgRx6SwktDshCZChzEDLx7jb+FBvtrclKbdlg0p6eX\nHv5hGrz7LBkxmiZGj0ktfmcnVUUa+fdlSQcl3a6S4lPWHEVrUjwr0qdZ292d\n5jvJ\r\n=7R5G\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIHc0X8lUtwI7OzFsJjcNpBfKd/rVaQ6rKLf43+F3xDLTAiAmJ4ulKJ8H3Kfj5ThtRnWhw9q1EVfwTh+IwqAJQBbZTg=="
          }
        ]
      },
      "maintainers": [
        {
          "name": "sindresorhus",
          "email": "sindresorhus@gmail.com"
        }
      ],
      "directories": {},
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/define-lazy-prop_2.0.0_1554885465463_0.30276632388262414"
      },
      "_hasShrinkwrap": false
    },
    "3.0.0": {
      "name": "define-lazy-prop",
      "version": "3.0.0",
      "description": "Define a lazily evaluated property on an object",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/sindresorhus/define-lazy-prop.git"
      },
      "funding": "https://github.com/sponsors/sindresorhus",
      "author": {
        "name": "Sindre Sorhus",
        "email": "sindresorhus@gmail.com",
        "url": "https://sindresorhus.com"
      },
      "type": "module",
      "exports": "./index.js",
      "engines": {
        "node": ">=12"
      },
      "scripts": {
        "test": "xo && ava && tsd"
      },
      "keywords": [
        "lazy",
        "property",
        "properties",
        "prop",
        "define",
        "object",
        "value",
        "lazily",
        "laziness",
        "evaluation",
        "eval",
        "execute",
        "getter",
        "function",
        "fn",
        "memoize",
        "cache",
        "defer",
        "deferred"
      ],
      "devDependencies": {
        "ava": "^3.15.0",
        "tsd": "^0.14.0",
        "xo": "^0.38.2"
      },
      "gitHead": "038c2e8088b23e81100e34e7f38d1690c631157c",
      "bugs": {
        "url": "https://github.com/sindresorhus/define-lazy-prop/issues"
      },
      "homepage": "https://github.com/sindresorhus/define-lazy-prop#readme",
      "_id": "define-lazy-prop@3.0.0",
      "_nodeVersion": "15.12.0",
      "_npmVersion": "6.14.10",
      "_npmUser": {
        "name": "sindresorhus",
        "email": "sindresorhus@gmail.com"
      },
      "dist": {
        "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
        "shasum": "dbb19adfb746d7fc6d734a06b72f4a00d021255f",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
        "fileCount": 5,
        "unpackedSize": 4415,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdp+dCRA9TVsSAnZWagAAtdIP/2XG9kff8vkvo9QfDrsu\n+Jen7qpf9DQZh6avmkR5qITSRAFgvO+Ndxxhj/fzXgmqmiL6TtB/pMmdbaMk\n17OY88dlkaTPnbimTmL55KBKge1h1E3QdvM/qSUm/XjgTZr39+/ITqnJT0Dg\ny1THjjauTBT4mpoFfNxz4SK4XTEToB6vJBPeUrsFYbKG7wDcVpMuzHFwf8Uj\nGIpnw0Hfvq94hkXw58CWonb8Y4oHE/RkjxcD1I6b3F8sH3h42wNIq2Pw2fZb\nJC1g+I/lM0tqWVbHWgnyoDeuiwGp5mQ/WH8EALMCzGzd8C7h/EGZFBkn0QBG\nfmLoCtSP1JaxM38R9/0EZAltUlAdCZ38dPZ7iDGGCPoBBW8wVQVd+nqJ86/R\nZWqStt66MS2EP51QVWwKpLfcz4/n4zv3fhKMs2fqpivQyYZCO18o9Hc2A2H3\nWEzgbM4gUsZiNueVhb+JrqxZuSItbDaPpNQ9XLRKeAHUU2Je5q1SIZG/rmXB\nw7Vdbc9dD2VgjaSDF+ETmNid+LcgbFZQv6Z60KCTUeBBheJS3ZTjhe68DIFV\nzAxOPGXoQcpOOK+ypI4TOby9FbUVQsmMVM7Xg2obBgntgAlpW4QQ4P7cZwRH\nqlBV2W4QT1f4Fb+3pWPcNGLB8pPJBlycT1lHdPWfSp8hkElc00hR6J2qYKCU\nyHEq\r\n=zv6n\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIFNVJiBrxBbTbwPqTinEKkzW1C0ttfJ0SqZs7d/wLnMTAiB91INsrjYQT7qYS4Z7AfTAm/87zUQfz/djVacxhN7tjA=="
          }
        ]
      },
      "directories": {},
      "maintainers": [
        {
          "name": "sindresorhus",
          "email": "sindresorhus@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/define-lazy-prop_3.0.0_1618386845533_0.6683468646287365"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "define-lazy-prop",
  "time": {
    "modified": "2026-04-27T09:09:24.344Z",
    "created": "2017-01-15T14:18:11.896Z",
    "1.0.0": "2017-01-15T14:18:11.896Z",
    "2.0.0": "2019-04-10T08:37:45.646Z",
    "3.0.0": "2021-04-14T07:54:05.644Z"
  },
  "readmeFilename": "readme.md",
  "homepage": "https://github.com/sindresorhus/define-lazy-prop#readme"
}