async-cell
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

async-cell

npm GitHub Workflow Status NPM

An async cell that holds a value and can alert users when a value is inserted.

Examples

const cell: AsyncCell<string> = new AsyncCell();

// Inserts the text hello world into the cell after a second.
setTimeout(() => cell.insert("Hello, world!"), 1000);

// Waits for the value to be inserted into the cell.
const value = await cell.load();
console.log(value);

Readme

Keywords

none

Package Sidebar

Install

npm i async-cell

Weekly Downloads

4

Version

0.3.1

License

Unlicense

Unpacked Size

21.4 kB

Total Files

7

Last publish

Collaborators

  • zebp