LocalStorageStrategy
katanakit-js / LocalStorageStrategy
Function: LocalStorageStrategy()
Section titled “Function: LocalStorageStrategy()”function LocalStorageStrategy(storage?): StorageStrategy;Defined in: infrastructure/storage/storage.service.ts:116
Creates a strategy backed by window.localStorage.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
storage? |
Storage |
Optional storage instance (defaults to window.localStorage). |
Returns
Section titled “Returns”Example
Section titled “Example”const strategy = LocalStorageStrategy();strategy.useSetItem("token", "abc123");