Sha256: 45887ce0a16d89cc00a71fcf9e391501e107876c827db04227ad408f8b5beae4
Contents?: true
Size: 673 Bytes
Versions: 5
Compression:
Stored size: 673 Bytes
Contents
import getPrototypeOf from "./getPrototypeOf"; import isNativeReflectConstruct from "./isNativeReflectConstruct"; import possibleConstructorReturn from "./possibleConstructorReturn"; export default function _createSuper(Derived) { var hasNativeReflectConstruct = isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }
Version data entries
5 entries across 5 versions & 2 rubygems