File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 19
19
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
20
// USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
22
+ var getOwnPropertyDescriptors = Object . getOwnPropertyDescriptors ||
23
+ function getOwnPropertyDescriptors ( obj ) {
24
+ var keys = Object . keys ( obj ) ;
25
+ var descriptors = { } ;
26
+ for ( var i = 0 ; i < keys . length ; i ++ ) {
27
+ descriptors [ keys [ i ] ] = Object . getOwnPropertyDescriptor ( obj , keys [ i ] ) ;
28
+ }
29
+ return descriptors ;
30
+ } ;
31
+
22
32
var formatRegExp = / % [ s d j % ] / g;
23
33
exports . format = function ( f ) {
24
34
if ( ! isString ( f ) ) {
@@ -637,7 +647,7 @@ exports.promisify = function promisify(original) {
637
647
} ) ;
638
648
return Object . defineProperties (
639
649
fn ,
640
- Object . getOwnPropertyDescriptors ( original )
650
+ getOwnPropertyDescriptors ( original )
641
651
) ;
642
652
}
643
653
@@ -687,7 +697,7 @@ function callbackify(original) {
687
697
688
698
Object . setPrototypeOf ( callbackified , Object . getPrototypeOf ( original ) ) ;
689
699
Object . defineProperties ( callbackified ,
690
- Object . getOwnPropertyDescriptors ( original ) ) ;
700
+ getOwnPropertyDescriptors ( original ) ) ;
691
701
return callbackified ;
692
702
}
693
703
exports . callbackify = callbackify ;
You can’t perform that action at this time.
0 commit comments