MCPcopy
hub / github.com/spritejs/spritejs / _createSuper

Function _createSuper

lib/node/cloud.js:38–38  ·  view source on GitHub ↗
(Derived)

Source from the content-addressed store, hash-verified

36require("gl-matrix").glMatrix.setMatrixArrayType(Array);
37
38function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
39
40function _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; } }
41

Callers 1

cloud.jsFile · 0.70

Calls 1

Tested by

no test coverage detected