Skip to content
0

katanakit-js / SessionStorageStrategy

Function: SessionStorageStrategy() ​

ts
function SessionStorageStrategy(storage?): StorageStrategy;

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

Creates a strategy backed by window.sessionStorage.

Parameters ​

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

Returns ​

StorageStrategy

A StorageStrategy.

Example ​

ts
const strategy = SessionStorageStrategy();
strategy.useSetItem("session", data);

Released under the MIT License.