Skip to content

@saflib/object-store


Function: createObjectStore()

createObjectStore(options): ObjectStore

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.

For GCS use @saflib/vendors-gcs. For Azure use @saflib/vendors-azure.

Parameters

ParameterType
optionsCreateObjectStoreOptions

Returns

ObjectStore