@zenfs/core 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,4 +8,4 @@ export declare const backends: {
8
8
  };
9
9
  export default backends;
10
10
  export { AsyncMirror, FolderAdapter, InMemory, OverlayFS };
11
- export declare function registerBackend(name: string, fs: BackendConstructor): void;
11
+ export declare function registerBackend(..._backends: BackendConstructor[]): void;
@@ -2,14 +2,12 @@ import { AsyncMirror } from './AsyncMirror';
2
2
  import { FolderAdapter } from './FolderAdapter';
3
3
  import { InMemoryFileSystem as InMemory } from './InMemory';
4
4
  import { OverlayFS } from './OverlayFS';
5
- export const backends = {
6
- AsyncMirror,
7
- FolderAdapter,
8
- InMemory,
9
- OverlayFS,
10
- };
5
+ export const backends = {};
11
6
  export default backends;
12
7
  export { AsyncMirror, FolderAdapter, InMemory, OverlayFS };
13
- export function registerBackend(name, fs) {
14
- backends[name] = fs;
8
+ export function registerBackend(..._backends) {
9
+ for (const backend of _backends) {
10
+ backends[backend.Name] = backend;
11
+ }
15
12
  }
13
+ registerBackend(AsyncMirror, FolderAdapter, InMemory, OverlayFS);