@babel/runtime
Advanced tools
Comparing version 7.0.0-beta.47 to 7.0.0-beta.48
var setPrototypeOf = require("./setPrototypeOf"); | ||
function isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
function _construct(Parent, args, Class) { | ||
if (typeof Reflect !== "undefined" && Reflect.construct) { | ||
if (isNativeReflectConstruct()) { | ||
module.exports = _construct = Reflect.construct; | ||
@@ -10,3 +23,3 @@ } else { | ||
a.push.apply(a, args); | ||
var Constructor = Parent.bind.apply(Parent, a); | ||
var Constructor = Function.bind.apply(Parent, a); | ||
var instance = new Constructor(); | ||
@@ -13,0 +26,0 @@ if (Class) setPrototypeOf(instance, Class.prototype); |
import setPrototypeOf from "./setPrototypeOf"; | ||
function isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
export default function _construct(Parent, args, Class) { | ||
if (typeof Reflect !== "undefined" && Reflect.construct) { | ||
if (isNativeReflectConstruct()) { | ||
_construct = Reflect.construct; | ||
@@ -9,3 +23,3 @@ } else { | ||
a.push.apply(a, args); | ||
var Constructor = Parent.bind.apply(Parent, a); | ||
var Constructor = Function.bind.apply(Parent, a); | ||
var instance = new Constructor(); | ||
@@ -12,0 +26,0 @@ if (Class) setPrototypeOf(instance, Class.prototype); |
export default function _getPrototypeOf(o) { | ||
_getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { | ||
return o.__proto__; | ||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { | ||
return o.__proto__ || Object.getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
} |
@@ -7,4 +7,10 @@ import setPrototypeOf from "./setPrototypeOf"; | ||
setPrototypeOf(subClass.prototype, superClass && superClass.prototype); | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
if (superClass) setPrototypeOf(subClass, superClass); | ||
} |
export default function _inheritsLoose(subClass, superClass) { | ||
subClass.prototype.__proto__ = superClass && superClass.prototype; | ||
subClass.prototype = Object.create(superClass.prototype); | ||
subClass.prototype.constructor = subClass; | ||
subClass.__proto__ = superClass; | ||
} |
@@ -8,2 +8,4 @@ import _gPO from "./getPrototypeOf"; | ||
_wrapNativeSuper = function _wrapNativeSuper(Class) { | ||
if (Class === null) return null; | ||
if (typeof Class !== "function") { | ||
@@ -19,3 +21,5 @@ throw new TypeError("Super expression must either be null or a function"); | ||
function Wrapper() {} | ||
function Wrapper() { | ||
return _construct(Class, arguments, _gPO(this).constructor); | ||
} | ||
@@ -30,5 +34,3 @@ Wrapper.prototype = Object.create(Class.prototype, { | ||
}); | ||
return _sPO(Wrapper, _sPO(function Super() { | ||
return construct(Class, arguments, _gPO(this).constructor); | ||
}, Class)); | ||
return _sPO(Wrapper, Class); | ||
}; | ||
@@ -35,0 +37,0 @@ |
function _getPrototypeOf(o) { | ||
module.exports = _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { | ||
return o.__proto__; | ||
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { | ||
return o.__proto__ || Object.getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
@@ -7,0 +6,0 @@ } |
@@ -8,3 +8,9 @@ var setPrototypeOf = require("./setPrototypeOf"); | ||
setPrototypeOf(subClass.prototype, superClass && superClass.prototype); | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
if (superClass) setPrototypeOf(subClass, superClass); | ||
@@ -11,0 +17,0 @@ } |
function _inheritsLoose(subClass, superClass) { | ||
subClass.prototype.__proto__ = superClass && superClass.prototype; | ||
subClass.prototype = Object.create(superClass.prototype); | ||
subClass.prototype.constructor = subClass; | ||
subClass.__proto__ = superClass; | ||
@@ -4,0 +5,0 @@ } |
@@ -11,2 +11,4 @@ var getPrototypeOf = require("./getPrototypeOf"); | ||
module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) { | ||
if (Class === null) return null; | ||
if (typeof Class !== "function") { | ||
@@ -22,3 +24,5 @@ throw new TypeError("Super expression must either be null or a function"); | ||
function Wrapper() {} | ||
function Wrapper() { | ||
return _construct(Class, arguments, getPrototypeOf(this).constructor); | ||
} | ||
@@ -33,5 +37,3 @@ Wrapper.prototype = Object.create(Class.prototype, { | ||
}); | ||
return setPrototypeOf(Wrapper, setPrototypeOf(function Super() { | ||
return construct(Class, arguments, getPrototypeOf(this).constructor); | ||
}, Class)); | ||
return setPrototypeOf(Wrapper, Class); | ||
}; | ||
@@ -38,0 +40,0 @@ |
@@ -5,4 +5,17 @@ var _Reflect$construct = require("../core-js/reflect/construct"); | ||
function isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !_Reflect$construct) return false; | ||
if (_Reflect$construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Date.prototype.toString.call(_Reflect$construct(Date, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
function _construct(Parent, args, Class) { | ||
if (typeof Reflect !== "undefined" && _Reflect$construct) { | ||
if (isNativeReflectConstruct()) { | ||
module.exports = _construct = _Reflect$construct; | ||
@@ -13,3 +26,3 @@ } else { | ||
a.push.apply(a, args); | ||
var Constructor = Parent.bind.apply(Parent, a); | ||
var Constructor = Function.bind.apply(Parent, a); | ||
var instance = new Constructor(); | ||
@@ -16,0 +29,0 @@ if (Class) setPrototypeOf(instance, Class.prototype); |
import _Reflect$construct from "../../core-js/reflect/construct"; | ||
import setPrototypeOf from "./setPrototypeOf"; | ||
function isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !_Reflect$construct) return false; | ||
if (_Reflect$construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Date.prototype.toString.call(_Reflect$construct(Date, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
export default function _construct(Parent, args, Class) { | ||
if (typeof Reflect !== "undefined" && _Reflect$construct) { | ||
if (isNativeReflectConstruct()) { | ||
_construct = _Reflect$construct; | ||
@@ -10,3 +24,3 @@ } else { | ||
a.push.apply(a, args); | ||
var Constructor = Parent.bind.apply(Parent, a); | ||
var Constructor = Function.bind.apply(Parent, a); | ||
var instance = new Constructor(); | ||
@@ -13,0 +27,0 @@ if (Class) setPrototypeOf(instance, Class.prototype); |
import _Object$getPrototypeOf from "../../core-js/object/get-prototype-of"; | ||
import _Object$setPrototypeOf from "../../core-js/object/set-prototype-of"; | ||
export default function _getPrototypeOf(o) { | ||
_getPrototypeOf = _Object$getPrototypeOf || function _getPrototypeOf(o) { | ||
return o.__proto__; | ||
_getPrototypeOf = _Object$setPrototypeOf ? _Object$getPrototypeOf : function _getPrototypeOf(o) { | ||
return o.__proto__ || _Object$getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
} |
@@ -0,1 +1,2 @@ | ||
import _Object$create from "../../core-js/object/create"; | ||
import setPrototypeOf from "./setPrototypeOf"; | ||
@@ -7,4 +8,10 @@ export default function _inherits(subClass, superClass) { | ||
setPrototypeOf(subClass.prototype, superClass && superClass.prototype); | ||
subClass.prototype = _Object$create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
if (superClass) setPrototypeOf(subClass, superClass); | ||
} |
@@ -0,4 +1,6 @@ | ||
import _Object$create from "../../core-js/object/create"; | ||
export default function _inheritsLoose(subClass, superClass) { | ||
subClass.prototype.__proto__ = superClass && superClass.prototype; | ||
subClass.prototype = _Object$create(superClass.prototype); | ||
subClass.prototype.constructor = subClass; | ||
subClass.__proto__ = superClass; | ||
} |
@@ -10,2 +10,4 @@ import _Object$create from "../../core-js/object/create"; | ||
_wrapNativeSuper = function _wrapNativeSuper(Class) { | ||
if (Class === null) return null; | ||
if (typeof Class !== "function") { | ||
@@ -21,3 +23,5 @@ throw new TypeError("Super expression must either be null or a function"); | ||
function Wrapper() {} | ||
function Wrapper() { | ||
return _construct(Class, arguments, _gPO(this).constructor); | ||
} | ||
@@ -32,5 +36,3 @@ Wrapper.prototype = _Object$create(Class.prototype, { | ||
}); | ||
return _sPO(Wrapper, _sPO(function Super() { | ||
return construct(Class, arguments, _gPO(this).constructor); | ||
}, Class)); | ||
return _sPO(Wrapper, Class); | ||
}; | ||
@@ -37,0 +39,0 @@ |
var _Object$getPrototypeOf = require("../core-js/object/get-prototype-of"); | ||
var _Object$setPrototypeOf = require("../core-js/object/set-prototype-of"); | ||
function _getPrototypeOf(o) { | ||
module.exports = _getPrototypeOf = _Object$getPrototypeOf || function _getPrototypeOf(o) { | ||
return o.__proto__; | ||
module.exports = _getPrototypeOf = _Object$setPrototypeOf ? _Object$getPrototypeOf : function _getPrototypeOf(o) { | ||
return o.__proto__ || _Object$getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
@@ -9,0 +10,0 @@ } |
@@ -0,1 +1,3 @@ | ||
var _Object$create = require("../core-js/object/create"); | ||
var setPrototypeOf = require("./setPrototypeOf"); | ||
@@ -8,3 +10,9 @@ | ||
setPrototypeOf(subClass.prototype, superClass && superClass.prototype); | ||
subClass.prototype = _Object$create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
if (superClass) setPrototypeOf(subClass, superClass); | ||
@@ -11,0 +19,0 @@ } |
@@ -0,3 +1,6 @@ | ||
var _Object$create = require("../core-js/object/create"); | ||
function _inheritsLoose(subClass, superClass) { | ||
subClass.prototype.__proto__ = superClass && superClass.prototype; | ||
subClass.prototype = _Object$create(superClass.prototype); | ||
subClass.prototype.constructor = subClass; | ||
subClass.__proto__ = superClass; | ||
@@ -4,0 +7,0 @@ } |
@@ -15,2 +15,4 @@ var _Object$create = require("../core-js/object/create"); | ||
module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) { | ||
if (Class === null) return null; | ||
if (typeof Class !== "function") { | ||
@@ -26,3 +28,5 @@ throw new TypeError("Super expression must either be null or a function"); | ||
function Wrapper() {} | ||
function Wrapper() { | ||
return _construct(Class, arguments, getPrototypeOf(this).constructor); | ||
} | ||
@@ -37,5 +41,3 @@ Wrapper.prototype = _Object$create(Class.prototype, { | ||
}); | ||
return setPrototypeOf(Wrapper, setPrototypeOf(function Super() { | ||
return construct(Class, arguments, getPrototypeOf(this).constructor); | ||
}, Class)); | ||
return setPrototypeOf(Wrapper, Class); | ||
}; | ||
@@ -42,0 +44,0 @@ |
{ | ||
"name": "@babel/runtime", | ||
"version": "7.0.0-beta.47", | ||
"version": "7.0.0-beta.48", | ||
"description": "babel selfContained runtime", | ||
@@ -9,12 +9,12 @@ "license": "MIT", | ||
"dependencies": { | ||
"core-js": "^2.5.3", | ||
"core-js": "^2.5.6", | ||
"regenerator-runtime": "^0.11.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.47", | ||
"@babel/helpers": "7.0.0-beta.47", | ||
"@babel/plugin-transform-runtime": "7.0.0-beta.47", | ||
"@babel/preset-env": "7.0.0-beta.47", | ||
"@babel/types": "7.0.0-beta.47" | ||
"@babel/core": "7.0.0-beta.48", | ||
"@babel/helpers": "7.0.0-beta.48", | ||
"@babel/plugin-transform-runtime": "7.0.0-beta.48", | ||
"@babel/preset-env": "7.0.0-beta.48", | ||
"@babel/types": "7.0.0-beta.48" | ||
} | ||
} |
111698
377
2924
Updatedcore-js@^2.5.6