Skip to content
0

katanakit-js / LocalStorageStrategy

Function: LocalStorageStrategy() ​

ts
function LocalStorageStrategy(storage?): StorageStrategy;

Defined in: src/infrastructure/storage/storage.service.ts:116

Creates a strategy backed by window.localStorage.

Parameters ​

ParameterTypeDescription
storage?StorageOptional storage instance (defaults to window.localStorage).

Returns ​

StorageStrategy

A StorageStrategy.

Example ​

ts
const strategy = LocalStorageStrategy();
strategy.useSetItem("token", "abc123");

Released under the MIT License.