Lines Matching refs:promise
2 # promise chapter
8 **N.B.** This promise exposes internals via underscore (`_`) prefixed properties. If you use these…
15 [travis-image]: https://img.shields.io/travis/then/promise.svg?style=flat
16 [travis-url]: https://travis-ci.org/then/promise
17 [dep-image]: https://img.shields.io/david/then/promise.svg?style=flat
18 [dep-url]: https://david-dm.org/then/promise
19 [npm-image]: https://img.shields.io/npm/v/promise.svg?style=flat
20 [npm-url]: https://npmjs.org/package/promise
21 [downloads-image]: https://img.shields.io/npm/dm/promise.svg?style=flat
22 [downloads-url]: https://npmjs.org/package/promise
28 $ npm install promise
35 <script src="https://www.promisejs.org/polyfills/promise-6.1.0.js"></script>
46 …n load the promise library (in a way that works on both client and server using node or browserify…
49 var Promise = require('promise');
51 var promise = new Promise(function (resolve, reject) {
62 var Promise = require('promise/domains');
68 var Promise = require('promise/setimmediate');
74 var Promise = require('promise/lib/es6-extensions');
75 // or require('promise/domains/es6-extensions');
76 // or require('promise/setimmediate/es6-extensions');
86 require('promise/lib/rejection-tracking').enable();
94 require('promise/lib/rejection-tracking').enable(
114 var Promise = require('promise');
119 This creates and returns a new promise. `resolver` must be a function. The `resolver` function is…
121 …promise value then the promise is fulfilled with that value. If it is called with a promise (A) t…
122 …2. `reject` should be called with a single argument. The returned promise will be rejected with t…
132 … value. If you pass it something that is close to a promise (such as a jQuery attempt at a promis…
136 Returns a rejected promise with the given value.
140 Returns a promise for an array. If it is called with a single argument that `Array.isArray` then t…
155 …tion which accepts a node style callback and returns a new function that returns a promise instead.
184 ….js callback and not parsed on to the child function, otherwise the API will just return a promise.
188 These methods are invoked on a promise instance by calling `myPromise.methodName`
196 If the promise is fulfilled then `onFulfilled` is called. If the promise is rejected then `onRejec…
198 …promise. If the handler that is called returns a promise, the promise returned by `.then` takes o…
208 The same semantics as `.then` except that it does not return a promise and any exceptions are re-th…