UNPKG

@furystack/filesystem-store

Version:

Simple File System store implementation for FuryStack

16 lines 736 B
import { addStore } from '@furystack/core'; import { FileSystemStore } from './filesystem-store.js'; /** * Creates and registers a FileSystemStore with the StoreManager * @param options The Options for store creation * @param options.injector The injector to use for creating the store * @param options.model The model to use for the store * @param options.primaryKey The primary key of the model * @param options.fileName The name of the file to use for the store * @param options.tickMs The time in ms to wait between each save */ export const useFileSystemStore = (options) => { const store = new FileSystemStore({ ...options }); addStore(options.injector, store); }; //# sourceMappingURL=store-manager-helpers.js.map