hasStoreInStorage
The hasStoreInStorage
function returns a boolean indicating whether durable PartyKit storage contains a serialized Store
.
hasStoreInStorage(
storage: Storage,
storagePrefix?: string,
): Promise<boolean>
Type | Description | |
---|---|---|
storage | Storage | A reference to the storage object, as would normally be accessible from the |
storagePrefix? | string | An optional prefix used before all the keys in the server's durable storage, to match the equivalent property in the server's |
returns | Promise<boolean> | A promised boolean indicating whether a |
This is intended for specialist applications that require the ability to inspect or load a TinyBase Store
from a server's storage outside of the normal context of a TinyBasePartyKitServer
.
The function is asynchronous, so you should use the await
keyword or handle the result as a promise.
Since
v4.4.1