Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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

```