diff --git a/README.md b/README.md new file mode 100644 index 0000000..620c357 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# defer +Remotely resolve/reject a promise + +## Install +```shell +yarn add @a1motion/defer +``` + +## Usage + +```javascript +import defer from "@a1motion/defer"; + +const promise = defer(); +promise.then(() => { + // do things after +}) + +// somewhere else +promise.resolve(); +```