-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump promise-resolver, and simplify implementation
I released [email protected] a bit prematurely, and have already cut 3.0.0. It now handles a number of corner cases we were handling manually: 1. Ensure callbacks are only called once 2. Require a promise implementation if no callback is provided 3. Ensure callbacks are called async And a few we were missing: 1. Look for `bluebird` and fallback to native promises 2. Supress `unhandledRejection` notices on promises if user provides a callback (assumes the callback handles errors). 3. Consistent behavior if they return a promise that is rejected with `null` / `undefined` 4. Minor performance boost by only binding deferred.resolve/deferred.reject methods as needed Closes #12
- Loading branch information
1 parent
58ca11e
commit 4a9bc23
Showing
3 changed files
with
11 additions
and
21 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
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