@visactor/vmind
Version:
<div align="center"> <a href="https://github.com/VisActor#gh-light-mode-only" target="_blank"> <img alt="VisActor Logo" width="200" src="https://github.com/VisActor/.github/blob/main/profile/logo_500_200_light.svg"/> </a> <a href="https://githu
23 lines (19 loc) • 572 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Factory = void 0;
const base_1 = require("../atom/base");
class Factory {
static registerAtom(name, Ctr) {
this.atoms[name] = Ctr;
}
static getAtom(name) {
return this.atoms[name];
}
static createAtom(name, context, options) {
const Ctr = this.getAtom(name);
return Ctr ? new Ctr(context, options) : new base_1.BaseAtom(context, options);
}
}
exports.Factory = Factory, Factory.atoms = {};
//# sourceMappingURL=factory.js.map