UNPKG

callable-instance2

Version:

Instances of classes which are directly callable as functions.

24 lines (23 loc) 1.19 kB
!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).CallableInstance2 = {}); }(this, (function(e) { "use strict"; function CallableInstance(e) { const t = this.constructor.prototype[e], apply = function() { return t.apply(apply, arguments); }; return Object.setPrototypeOf(apply, this.constructor.prototype), Object.getOwnPropertyNames(t).forEach((function(e) { Object.defineProperty(apply, e, Object.getOwnPropertyDescriptor(t, e)); })), apply; } CallableInstance.prototype = /*#__PURE__*/ Object.create(Function.prototype), Object.defineProperty(CallableInstance, "__esModule", { value: !0 }), Object.defineProperty(CallableInstance, "CallableInstance", { value: CallableInstance }), Object.defineProperty(CallableInstance, "default", { value: CallableInstance }), e.CallableInstance = CallableInstance, e.default = CallableInstance, Object.defineProperty(e, "__esModule", { value: !0 }); })); //# sourceMappingURL=index.umd.production.min.cjs.map