auto-gpt-ts
Version:
my take of Auto-GPT in typescript
16 lines • 440 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Singleton = void 0;
function Singleton(constructor) {
let instance;
return new Proxy(constructor, {
construct: (target, args) => {
if (!instance) {
instance = new target(...args);
}
return instance;
}
});
}
exports.Singleton = Singleton;
//# sourceMappingURL=singelton.js.map