crpr
v0.2.0
Published
Create a promise, but avoid using constructors.
Downloads
17
Readme
crpr
Create a promise, but avoid using constructors.
📦 Installation
$ npm install crpr
$ yarn add crpr
$ pnpm add crpr
🚀 Usage
import { crpr } from "crpr";
const { promise, resolve, reject } = crpr<string>();
// or const [promise, resolve, reject] = crpr<string>();
resolve("114514");
promise.then(console.log); // 114514