File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,19 @@ var Promise = require('bluebird');
2
2
var EventEmitter = require ( 'events' ) . EventEmitter ;
3
3
var util = require ( 'util' )
4
4
5
+ // pending ponyfill
6
+ // http://bluebirdjs.com/docs/api/deferred-migration.html
7
+ Promise . pending = function ( ) {
8
+ ret = { } ;
9
+
10
+ ret . promise = new Promise ( function ( res , rej ) {
11
+ ret . resolve = res ;
12
+ ret . reject = rej ;
13
+ } ) ;
14
+
15
+ return ret ;
16
+ } ;
17
+
5
18
function PSemaphore ( opts ) {
6
19
opts = opts || { } ;
7
20
@@ -75,5 +88,4 @@ PSemaphore.prototype.add = function(work) {
75
88
return work . Promise . promise ;
76
89
} ;
77
90
78
-
79
91
module . exports = PSemaphore
Original file line number Diff line number Diff line change 18
18
"author" : " Sam Saccone" ,
19
19
"license" : " MIT" ,
20
20
"dependencies" : {
21
- "bluebird" : " 3.1 .1"
21
+ "bluebird" : " ^3.3 .1"
22
22
},
23
23
"devDependencies" : {
24
24
"chai-as-promised" : " 5.1.0" ,
You can’t perform that action at this time.
0 commit comments