Sha256: 2bf35afeca94d06cfd7f5fef50b34df43bb4a071d9a7ba709fb50dacfcf1ce5d
Contents?: true
Size: 702 Bytes
Versions: 5
Compression:
Stored size: 702 Bytes
Contents
var getPrototypeOf = require("./getPrototypeOf"); var isNativeReflectConstruct = require("./isNativeReflectConstruct"); var possibleConstructorReturn = require("./possibleConstructorReturn"); 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); }; } module.exports = _createSuper;
Version data entries
5 entries across 5 versions & 2 rubygems