Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/so1ve/crpr
Create a promise, but avoid using constructors.
https://github.com/so1ve/crpr
javascript promise
Last synced: 19 days ago
JSON representation
Create a promise, but avoid using constructors.
- Host: GitHub
- URL: https://github.com/so1ve/crpr
- Owner: so1ve
- License: mit
- Created: 2023-05-20T08:27:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-13T17:26:35.000Z (7 months ago)
- Last Synced: 2024-04-14T08:01:36.087Z (7 months ago)
- Topics: javascript, promise
- Language: TypeScript
- Homepage:
- Size: 692 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# crpr
[![NPM version](https://img.shields.io/npm/v/crpr?color=a1b858&label=)](https://www.npmjs.com/package/crpr)
Create a promise, but avoid using constructors.
## 📦 Installation
```bash
$ npm install crpr
$ yarn add crpr
$ pnpm add crpr
```## 🚀 Usage
```ts
import { crpr } from "crpr";const { promise, resolve, reject } = crpr();
// or const [promise, resolve, reject] = crpr();resolve("114514");
promise.then(console.log); // 114514
```## 📝 License
[MIT](./LICENSE). Made with ❤️ by [Ray](https://github.com/so1ve)