@mewters/smart-storage
Version:
A JavaScript/TypeScript library designed to simplify working with localStorage, sessionStorage, and cookies by offering automatic object conversion and consistent API.
9 lines (8 loc) • 347 B
TypeScript
export declare class CookieStorage {
static getCookieValue(name: string, cookieString: string): string | undefined;
static get<T>(key: string, defaultValue: T): T;
static set<T>(key: string, value: T, days?: number): void;
static remove(key: string): void;
static removeItems(keys: string[]): void;
static clear(): void;
}