es6-class-prototype
Version:
get prototype from es6 class, like old way
22 lines (21 loc) • 1 kB
JavaScript
!function(e, t) {
"object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define([ "exports" ], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).EsClassPrototype = {});
}(this, (function(e) {
"use strict";
function classPrototype(e, t) {
let o = Object.getOwnPropertyDescriptors(e.prototype), s = Object.keys(o).reduce((function(s, r) {
return (t || !o[r].get && !o[r].set) && (s[r] = e.prototype[r]), s;
}), {});
return Object.assign({}, e.prototype, s);
}
Object.defineProperty(classPrototype, "__esModule", {
value: !0
}), Object.defineProperty(classPrototype, "classPrototype", {
value: classPrototype
}), Object.defineProperty(classPrototype, "default", {
value: classPrototype
}), e.classPrototype = classPrototype, e.default = classPrototype, Object.defineProperty(e, "__esModule", {
value: !0
});
}));
//# sourceMappingURL=index.umd.production.min.cjs.map