Skip to content
farbenmeerPublic

About

Deep concurrent programming in typescript

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

@farbenmeer/lacy

Lightweight utility for lazy evaluation of JavaScript promises. Chain property access and method calls without awaiting intermediate values.

Documentation | GitHub | npm

import { lacy } from "@farbenmeer/lacy";

// Instead of this:
const response = await fetch("/api/users");
const data = await response.json();
const name = data[0].name;

// Write this:
const name = await lacy(fetch("/api/users")).json()[0].name;

Installation

npm install @farbenmeer/lacy
yarn add @farbenmeer/lacy
pnpm add @farbenmeer/lacy
bun add @farbenmeer/lacy

License

MIT

About

Deep concurrent programming in typescript

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages