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 1919// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121
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+
2232var formatRegExp = / % [ s d j % ] / g;
2333exports . format = function ( f ) {
2434 if ( ! isString ( f ) ) {
@@ -637,7 +647,7 @@ exports.promisify = function promisify(original) {
637647 } ) ;
638648 return Object . defineProperties (
639649 fn ,
640- Object . getOwnPropertyDescriptors ( original )
650+ getOwnPropertyDescriptors ( original )
641651 ) ;
642652}
643653
@@ -687,7 +697,7 @@ function callbackify(original) {
687697
688698 Object . setPrototypeOf ( callbackified , Object . getPrototypeOf ( original ) ) ;
689699 Object . defineProperties ( callbackified ,
690- Object . getOwnPropertyDescriptors ( original ) ) ;
700+ getOwnPropertyDescriptors ( original ) ) ;
691701 return callbackified ;
692702}
693703exports . callbackify = callbackify ;
You can’t perform that action at this time.
0 commit comments