Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabervitale/pinky-promise
A Promise A+ spec compliant implementation written in Typescript
https://github.com/fabervitale/pinky-promise
promise promise-library promiseaplus typescript
Last synced: 13 days ago
JSON representation
A Promise A+ spec compliant implementation written in Typescript
- Host: GitHub
- URL: https://github.com/fabervitale/pinky-promise
- Owner: FaberVitale
- License: mit
- Created: 2023-11-06T20:35:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-11T10:15:58.000Z (12 months ago)
- Last Synced: 2024-10-06T17:41:52.087Z (about 1 month ago)
- Topics: promise, promise-library, promiseaplus, typescript
- Language: TypeScript
- Homepage: https://build-js-promise.netlify.app/1
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# PinkyPromise
## Description
A [Promise A+](https://promisesaplus.com/) spec compliant Promise implementation written in [Typescript](https://www.typescriptlang.org/).
The api is copy of Ecmascript [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
## Why?
This implementation was built for a [talk](https://github.com/FaberVitale/build-js-promise-from-scratch-talk).
Although fully spec compliant and thoroughly tested, we do no recommend using this implementation the over [`globalThis.Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
## Develop
### Set node version
```bash
nvm use
```### Package manager
This project uses [pnpm](https://pnpm.io/) as package manger and managed by [corepack](https://nodejs.org/api/corepack.html).
Run `corepack enable` to enable `pnpm`.
### Scripts
#### build
```bash
pnpm build
```#### test
```bash
pnpm test # requires `pnpm build`
```## References
### MDN
- [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
- [Using Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)### Specs
- [Promise A+ spec](https://promisesaplus.com/)
- [Ecmascript Promise](https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-promise-objects)## License
[MIT](LICENSE)