包详细信息

all-properties-lazy

JoshuaKGoldberg33.4kMIT0.1.0

Evalutes the properties of an object, including functions, Promises, and their combination. 😴

自述文件

All Properties Lazy

Evalutes the properties of an object, including functions, Promises, and their combination. 😴

👪 All Contributors: 1 🤝 Code of Conduct: Kept 🧪 Coverage 📝 License: MIT 📦 npm version 💪 TypeScript: Strict

Usage

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"),
});

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

Development

See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md. Thanks! 💖

Contributors

Josh Goldberg ✨
Josh Goldberg ✨

💻 🖋 📖 🤔 🚇 🚧 📆 🔧

💝 This package was templated with create-typescript-app using the Bingo engine.