This repository has been archived by the owner on Mar 24, 2020. It is now read-only.
forked from kriskowal/q
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Altered caught exception reporting; now must be explicit. Provided be…
…tter .end behavior and added .report chaining.
- Loading branch information
Showing
4 changed files
with
82 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
This API varies from Tyler Closes ref_send in the | ||
following ways: | ||
|
||
* Promises can be resolved to function values. | ||
* Promises can be resolved to null or undefined. | ||
* Promises are distinguishable from arbitrary functions. | ||
* The promise API is abstracted with a Promise constructor | ||
that accepts a descriptor that receives all of the | ||
messages forwarded to that promise and handles the | ||
common patterns for message receivers. The promise | ||
constructor also takes optional fallback and valueOf | ||
methods which handle the cases for missing handlers on | ||
the descriptor (rejection by default) and the valueOf | ||
call (which returns the promise itself by default) | ||
* near(ref) has been changed to Promise.valueOf() in | ||
keeping with JavaScript's existing Object.valueOf(). | ||
* post(promise, name, args) has been altered to a variadic | ||
post(promise, name ...args) | ||
* variadic arguments are used internally where | ||
applicable. However, I have not altered the Q.post() | ||
API to expand variadic arguments since Tyler Close | ||
informed the CommonJS list that it would restrict | ||
usage patterns for web_send, posting arbitrary JSON | ||
objects as the "arguments" over HTTP. | ||
|