UNPKG

q42-cms-components

Version:

18 lines (12 loc) 358 B
import { CRUDStore } from '../tools/crud-store.js'; const stores = {}; class CRUDStores { getStore(path) { return stores[path] = stores[path] || new CRUDStore(path); } getStoreBySchemaRef($ref) { var path = $ref.match(/^(.*)\/schema$/)[1]; return this.getStore(path); } } export const crudStores = new CRUDStores();