Synclets logoSynclets

createSessionStorageSynclet

The createSessionStorageSynclet function creates a complete Synclet with sessionStorage-backed data and meta connectors in a single call.

createSessionStorageSynclet<Depth>(options: SessionStorageSyncletOptions<Depth>): Promise<Synclet<Depth, SessionStorageDataConnector<Depth>, SessionStorageMetaConnector<Depth>>>
TypeDescription
optionsSessionStorageSyncletOptions<Depth>

Configuration options including storage names, depth, transport, and other synclet settings.

returnsPromise<Synclet<Depth, SessionStorageDataConnector<Depth>, SessionStorageMetaConnector<Depth>>>

A Promise that resolves to a fully configured Synclet instance.

This is the most convenient way to create a browser-based Synclet with ephemeral, tab-scoped storage, handling connector creation and synclet setup with a single options object. Data and metadata are cleared when the tab closes.

Since

v0.0.0