@saflib/object-store
@saflib/object-store
Classes
| Class | Description |
|---|---|
| DiskObjectStore | - |
| FileNotFoundError | - |
| ObjectStore | - |
| PathTraversalError | - |
| StorageError | - |
| TestObjectStore | In-memory ObjectStore for tests. Use setFiles/getFiles to seed or inspect state when testing code that uses an ObjectStore. |
Interfaces
| Interface | Description |
|---|---|
| TestFile | - |
Type Aliases
| Type Alias | Description |
|---|---|
| CreateObjectStoreOptions | - |
Functions
| Function | Description |
|---|---|
| createObjectStore | Creates an ObjectStore instance. When NODE_ENV is "test", always returns a TestObjectStore (in-memory) regardless of the requested type, so tests don't write to disk. Stores are cached by container key so multiple contexts with the same config share the same in-memory store. |