https://github.com/zebp/async-cell
An async cell for TypeScript that supports Node and Deno
https://github.com/zebp/async-cell
async async-cell deno nodejs promises typescript
Last synced: 10 months ago
JSON representation
An async cell for TypeScript that supports Node and Deno
- Host: GitHub
- URL: https://github.com/zebp/async-cell
- Owner: zebp
- License: unlicense
- Created: 2021-04-23T15:48:50.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-02-06T18:46:12.000Z (over 4 years ago)
- Last Synced: 2025-09-01T21:43:43.226Z (10 months ago)
- Topics: async, async-cell, deno, nodejs, promises, typescript
- Language: TypeScript
- Homepage:
- Size: 17.6 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# async-cell



An async cell that holds a value and can alert users when a value is inserted.
## Examples
```typescript
const cell: AsyncCell = 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);
```