From e1e2e659d1cb6cd5ccf01cb30adcf1581a2d97ab Mon Sep 17 00:00:00 2001 From: Sabbir Hossain Shuvo <82939905+devlopersabbir@users.noreply.github.com> Date: Fri, 21 Mar 2025 17:37:35 +0600 Subject: [PATCH] Update storage.ts --- src/storage.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage.ts b/src/storage.ts index 8ad7293..187483c 100644 --- a/src/storage.ts +++ b/src/storage.ts @@ -40,7 +40,9 @@ export async function lscStorage>(key: string): Pr * const user = await lscStorage("user"); * console.log(user); // { name: "John Doe", age: 25 } */ + export async function lscStorage>(key: string, value?: T): Promise { + // this method need to be remove as soon as possible try { if (value !== undefined) { localStorage.setItem(key, JSON.stringify(value));