Download node_modules/@supabase/auth-js/src/lib/local-storage.ts from metarm/QMetaRam: direct link, hf CLI and curl.
- Browser
- Download file 440 Bytes
-
https://huggingface.co/metarm/QMetaRam/resolve/main/node_modules/%40supabase/auth-js/src/lib/local-storage.ts
- Command line
-
hf download hf://metarm/QMetaRam/node_modules/@supabase/auth-js/src/lib/local-storage.ts
-
curl -L -o local-storage.ts https://huggingface.co/metarm/QMetaRam/resolve/main/node_modules/%40supabase/auth-js/src/lib/local-storage.ts
440 Bytes
| import { SupportedStorage } from './types' | |
| /** | |
| * Returns a localStorage-like object that stores the key-value pairs in | |
| * memory. | |
| */ | |
| export function memoryLocalStorageAdapter(store: { [key: string]: string } = {}): SupportedStorage { | |
| return { | |
| getItem: (key) => { | |
| return store[key] || null | |
| }, | |
| setItem: (key, value) => { | |
| store[key] = value | |
| }, | |
| removeItem: (key) => { | |
| delete store[key] | |
| }, | |
| } | |
| } | |