UNPKG

froge

Version:

Jump-start your NodeJS/Bun/... services with dependency & lifecycle management and handy helper methods

27 lines 780 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.plug = plug; function plug(key) { const plug = (function plugResolver() { const service = plugResolver.__startedService; if (typeof service !== 'undefined') { return service(); } throw new Error(`Trying to access uninitialized plug for service '${key}'`); }); Object.defineProperties(plug, { __startedService: { writable: true, }, isReady: { get: function () { return typeof this.__startedService !== 'undefined'; }, }, isFrogePlug: { get: () => true, }, }); return Object.seal(plug); } //# sourceMappingURL=plug.js.map