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.
objis the object to add the property tonameis the name of the propertyinitis a function that computes the value of the propertyenumerableif 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!
