UNPKG

es6-class-prototype

Version:
36 lines (31 loc) 1.17 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EsClassPrototype = {})); })(this, (function (exports) { 'use strict'; function classPrototype(target, all) { let desc = Object.getOwnPropertyDescriptors(target.prototype); let prototype = Object.keys(desc).reduce(function (a, b) { if (all || !desc[b].get && !desc[b].set) { a[b] = target.prototype[b]; } return a; }, {}); return Object.assign({}, target.prototype, prototype); } { Object.defineProperty(classPrototype, "__esModule", { value: true }); Object.defineProperty(classPrototype, 'classPrototype', { value: classPrototype }); Object.defineProperty(classPrototype, 'default', { value: classPrototype }); } exports.classPrototype = classPrototype; exports["default"] = classPrototype; Object.defineProperty(exports, '__esModule', { value: true }); })); //# sourceMappingURL=index.umd.development.cjs.map