Skip to content

LocalStorageStrategy

katanakit-js / LocalStorageStrategy

function LocalStorageStrategy(storage?): StorageStrategy;

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

Creates a strategy backed by window.localStorage.

Parameter Type Description
storage? Storage Optional storage instance (defaults to window.localStorage).

StorageStrategy

A StorageStrategy.

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