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: 7 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-12-12T18:21:47.000Z (15 days ago)
- Last Synced: 2024-12-16T15:23:24.648Z (11 days ago)
- Topics: javascript, promise
- Language: TypeScript
- Homepage:
- Size: 565 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
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)