|
8 | 8 | * @description
|
9 | 9 | * A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).
|
10 | 10 | *
|
11 |
| - * $q can be used in two fashions --- One, which is more similar to Kris Kowal's Q or jQuery's Deferred |
12 |
| - * implementations, the other resembles ES6 promises to some degree. |
| 11 | + * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred |
| 12 | + * implementations, and the other which resembles ES6 promises to some degree. |
13 | 13 | *
|
14 | 14 | * # $q constructor
|
15 | 15 | *
|
16 | 16 | * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`
|
17 |
| - * function as the first argument). This is similar to the native Promise implementation from ES6 Harmony, |
| 17 | + * function as the first argument. This is similar to the native Promise implementation from ES6 Harmony, |
18 | 18 | * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
|
19 | 19 | *
|
20 |
| - * While the constructor-style use is supported, not all of the supporting methods from Harmony promises are |
| 20 | + * While the constructor-style use is supported, not all of the supporting methods from ES6 Harmony promises are |
21 | 21 | * available yet.
|
22 | 22 | *
|
23 | 23 | * It can be used like so:
|
|
44 | 44 | * });
|
45 | 45 | * ```
|
46 | 46 | *
|
47 |
| - * Note, progress/notify callbacks are not currently supported via the ES6-style interface. |
| 47 | + * Note: progress/notify callbacks are not currently supported via the ES6-style interface. |
48 | 48 | *
|
49 |
| - * However, the more traditional CommonJS style usage is still available, and documented below. |
| 49 | + * However, the more traditional CommonJS-style usage is still available, and documented below. |
50 | 50 | *
|
51 | 51 | * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an
|
52 | 52 | * interface for interacting with an object that represents the result of an action that is
|
|
134 | 134 | *
|
135 | 135 | * This method *returns a new promise* which is resolved or rejected via the return value of the
|
136 | 136 | * `successCallback`, `errorCallback`. It also notifies via the return value of the
|
137 |
| - * `notifyCallback` method. The promise can not be resolved or rejected from the notifyCallback |
| 137 | + * `notifyCallback` method. The promise cannot be resolved or rejected from the notifyCallback |
138 | 138 | * method.
|
139 | 139 | *
|
140 | 140 | * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
|
|
204 | 204 | * ```
|
205 | 205 | *
|
206 | 206 | * @param {function(function, function)} resolver Function which is responsible for resolving or
|
207 |
| - * rejecting the newly created promise. The first parameteter is a function which resolves the |
| 207 | + * rejecting the newly created promise. The first parameter is a function which resolves the |
208 | 208 | * promise, the second parameter is a function which rejects the promise.
|
209 | 209 | *
|
210 | 210 | * @returns {Promise} The newly created promise.
|
|
0 commit comments