From d86a6532492421499a49e194ee2394844d7d060e Mon Sep 17 00:00:00 2001 From: Connor Date: Thu, 25 Oct 2018 00:25:13 -0400 Subject: [PATCH] Create README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 README.md 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(); +```