Evalutes the properties of an object, including functions, Promises, and their combination. π΄
npm i all-properties-lazy
import { allPropertiesLazy } from "all-properties-lazy";
await allPropertiesLazy({
immediate: "immediate",
lazy: () => "lazy",
lazyAsync: async () => {
await Promise.resolve();
return "lazy async";
},
promise: Promise.resolve("promise"),
});
// Result:
// {
// immediate: "immediate",
// lazy: "lazy",
// lazyAsync: "lazy async",
// promise: "promise"
// }
Retrieves all properties of an object, factoring in lazy properties. Properties can be:
- Immediate: a direct value
- Lazy: a function for a value
- Lazy and asynchronous: a function that returns a Promise
- Promise: a direct Promise
See .github/CONTRIBUTING.md
, then .github/DEVELOPMENT.md
.
Thanks! π΄
Josh Goldberg β¨ π» π π π€ π π§ π π§ |
π This package was templated with
create-typescript-app
using the Bingo framework.
π This package was templated with
create-typescript-app
using the Bingo engine.