Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 870 Bytes

README.md

File metadata and controls

54 lines (36 loc) · 870 Bytes

Promise Futurable

Implement an Owner Promise.

Building Promises from scratch

refer to:JavaScript Promises by Building a Custom Implementation

refer to: Custom Promise

Usage

# install
npm install @laqudee/promise-futurable

# usage
import Futurable from '@laqudee/promise-futurable'

Development

# 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
# link fro global
pnpm link --global

# when use custom-promise
pnpm link --global @laqudee/promise-futurable