{"library":"swr-sync-storage","type":"library","category":null,"description":"Synchronize SWR cache with localStorage or sessionStorage to provide offline cache persistence. Version 1.0.1, stable release. Requires SWR v0.2.0-beta.0 or greater as a peer dependency. This package allows binding SWR's cache to browser storage (localStorage or sessionStorage), enabling offline support and cache persistence across sessions. It provides three importable functions: syncWithStorage (generic, takes a storage type string), syncWithLocalStorage (pre-bound to localStorage), and syncWithSessionStorage (pre-bound to sessionStorage). Unlike manual cache management, it automatically syncs SWR cache changes to storage and restores cache on reload. Supports custom JSON parsing for non-object values. TypeScript types included.","language":"javascript","status":"active","version":"1.0.1","tags":["javascript","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install swr-sync-storage","imports":["import { syncWithStorage } from 'swr-sync-storage'","import { syncWithLocalStorage } from 'swr-sync-storage'","import { syncWithSessionStorage } from 'swr-sync-storage'"]},{"cmd":"yarn add swr-sync-storage","imports":[]},{"cmd":"pnpm add swr-sync-storage","imports":[]}],"homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"swr-sync-storage","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}