Lazy-property
lazy-property
Add a lazily initialized property to an object.
lazy-propert
play well with Object.defineProperty
to provide laziness over object's properties.
Get it: npm install lazy-property
Sample usage:
1
|
|
^ Adds a lazily initialized property to the object.
obj
is the object to add the property toname
is the name of the propertyinit
is a function that computes the value of the propertyenumerable
if the property is enumerable (default false)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
GIF FTW!