UNPKG

@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

17 lines (15 loc) 439 B
import { BaseAtom } from "../atom/base"; export 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 BaseAtom(context, options); } } Factory.atoms = {}; //# sourceMappingURL=factory.js.map