Skip to content

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

License

Notifications You must be signed in to change notification settings

JoshuaKGoldberg/all-properties-lazy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

54 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

// 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

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 framework.

πŸ’ This package was templated with create-typescript-app using the Bingo engine.

About

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

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published