Show:

Module: promises/rsvp

promises/rsvp

RSVP promises module.

See:

Extends

Methods

isPromise(obj){boolean}

modules/promises/rsvp.js, line 97

Whether the given obj argument is a Promise.

Name Type Description
obj *

argument to check.

Promise(){deferred}

modules/promises/rsvp.js, line 22

Returns a deferred object.

note: for the sake of interoperability promise property is converted into a method.

See:
Returns:
"deferred" object.

Promise(){Promise}

modules/promises/rsvp.js, line 41

Constructs a promise object.

See:
Returns:
Promise object.

race(promises){Promise}

modules/promises/rsvp.js, line 85

Returns a promise that resolves or rejects as soon as one of the promises in the iterable resolves or rejects, with the value or reason from that promise.

Name Type Description
promises Array.<Promise>

array of Promises.

when(value){Promise}

modules/promises/rsvp.js, line 51

Converts any given argument into a Promise. If that argument is a Promise it returns it.

Name Type Description
value *

value or promise to convert into a Promise.

whenAll(promises){Promise}

modules/promises/rsvp.js, line 62

Returns a Promise that is resolved once all Promises in the promises list are resolved, or rejected if one of those is rejected.

Name Type Description
promises Array

array of Promises and/or values.

See: