Synclets logoSynclets

createLocalStorageSynclet

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

createLocalStorageSynclet<Depth>(options: LocalStorageSyncletOptions<Depth>): Promise<Synclet<Depth, LocalStorageDataConnector<Depth>, LocalStorageMetaConnector<Depth>>>
TypeDescription
optionsLocalStorageSyncletOptions<Depth>

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

returnsPromise<Synclet<Depth, LocalStorageDataConnector<Depth>, LocalStorageMetaConnector<Depth>>>

A Promise that resolves to a fully configured Synclet instance.

This is the most convenient way to create a browser-based Synclet, handling connector creation and synclet setup with a single options object. Both data and metadata persist across browser sessions.

Since

v0.0.0