define-lazy-prop
npmv3.0.0Define a lazily evaluated property on an object
Overview
define-lazy-prop is an npm package that define a lazily evaluated property on an object. It is extremely widely used, with about 84.2M downloads per week and 1 known dependents in the graph. The latest version is 3.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need define a lazily evaluated property on an object and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (84.2M weekly downloads).
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of define-lazy-prop.
Dependencies
Dev (3)
Used by
Popular packages that depend on define-lazy-prop.
Alternatives to define-lazy-prop
Merge objects using their property descriptors
`Object.defineProperty`, but not IE 8's broken one.
Really Fast Deep Clone
Define a data property on an object. Will fall back to assignment in an engine without descriptors.
A memoization library which only remembers the latest invocation
Filter object keys and values into a new object
Reuse objects and functions with style
A Promise-compatible abstraction that defers resolving/rejecting promises to another closure.
Check if something is a generator function
Cross platform child_process#spawn and child_process#spawnSync
A lightweight cache for file metadata, ideal for processes that work on a specific set of files and only need to reprocess files that have changed since the last run
Run a function exactly one time
Frequently installed together
TypeScript definitions for node
Utilities for working with Windows Subsystem for Linux (WSL)
Get the default browser
Check if the process is running in an SSH session
Check if the process is running inside a container (Docker/Podman)
Version history
| Version | Published | License |
|---|---|---|
| 3.0.0latest | 5 years ago | MIT |
| 2.0.0 | 7 years ago | MIT |
| 1.0.0 | 9 years ago | MIT |
Maintainers
Funding
Frequently asked questions
How do I install define-lazy-prop?
Run `npm install define-lazy-prop` to add define-lazy-prop to your npm project.
What license is define-lazy-prop released under?
define-lazy-prop is distributed under the MIT license.
How popular is define-lazy-prop?
define-lazy-prop has approximately 84,225,790 downloads per week and 1 known dependent packages.