Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 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 (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-06T18:46:12.000Z (about 3 years ago)
- Last Synced: 2024-10-11T19:24:02.745Z (4 months ago)
- Topics: async, async-cell, deno, nodejs, promises, typescript
- Language: TypeScript
- Homepage:
- Size: 17.6 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# async-cell
![npm](https://img.shields.io/npm/v/async-cell)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/zebp/async-cell/ci)
![NPM](https://img.shields.io/npm/l/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);
```