Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

promise-remotely

Create native ES6 promises that can be resolved or rejected externally.

A simple and powerful Promise package that give to you capability to remote resolve/reject a promise.

Getting Started

First of all install the package

npm i promise-remotely

Then import the package

import PromiseRemotely from  'promise-remotely'

Create a Instance of a remote promise

const sampleRemotePromise  =  PromiseRemotely()

To remotely solve the promise

sampleRemotePromise.resolve()

To remotely reject the promise

sampleRemotePromise.reject()

You can either pass a result object

sampleRemotePromise.resolve({  status:  200  })

How await the remote promise

const result = await sampleRemotePromise.promise

About

A simple and powerful Promise lib that give to you capability to remote resolve/reject a promise.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages