Sha256: 06ad1294f5af550b26531565554d98258205f1223e1506493375815c72b2111f
Contents?: true
Size: 1.22 KB
Versions: 13
Compression:
Stored size: 1.22 KB
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _wrapNativeSuper; var _getPrototypeOf = require("getPrototypeOf"); var _setPrototypeOf = require("setPrototypeOf"); var _isNativeFunction = require("isNativeFunction"); var _construct = require("construct"); function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; exports.default = _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } //# sourceMappingURL=wrapNativeSuper.js.map
Version data entries
13 entries across 13 versions & 2 rubygems