Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 486 Bytes

is_promise.md

File metadata and controls

20 lines (13 loc) · 486 Bytes

A function which determines whether the object is a Promise.

Arguments

  1. p (Any): The object to determine whether it is a promise.

Returns

(Boolean): true if the object is a Promise else false

Example

var isPromise = Rx.helpers.isPromise;

var p = RSVP.Promise(res => res(42));

console.log(isPromise(p));
// => true