Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laqudee/promise-futurable
Building Promises from scratch
https://github.com/laqudee/promise-futurable
promise promiseaplus rollup typescript
Last synced: about 1 month ago
JSON representation
Building Promises from scratch
- Host: GitHub
- URL: https://github.com/laqudee/promise-futurable
- Owner: laqudee
- Created: 2023-12-21T05:57:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-23T01:07:07.000Z (11 months ago)
- Last Synced: 2024-02-23T02:25:00.039Z (11 months ago)
- Topics: promise, promiseaplus, rollup, typescript
- Language: TypeScript
- Homepage: https://north-impulse-b83.notion.site/Promise-Async-await-d48658273084405a8b9cfd357e0926fe?pvs=4
- Size: 111 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Promise Futurable
Implement an Owner Promise.
Building Promises from scratch
[refer to:JavaScript Promises by Building a Custom Implementation](https://codefrontend.com/promises/)
[refer to: Custom Promise](https://github.com/laqudee/custom-promise)
## Usage
```bash
# install
npm install @laqudee/promise-futurable# usage
import Futurable from '@laqudee/promise-futurable'
```## Development
```bash
# install
pnpm install# dev -- use tsx compiler .ts file in command line
pnpm dev# build -- use rollup build
pnpm build# test -- use vitest
pnpm test# format -- use prettier
pnpm format# dev:cjs -- example
# "type": "module", // if add type: module; dev:cjs can't work
pnpm dev:cjs#dev esm -- example
pnpm dev:esm
``````bash
# link fro global
pnpm link --global# when use custom-promise
pnpm link --global @laqudee/promise-futurable```