Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hoseungme/storage-cover
Web storage wrapper for continuous web application in all browsers
https://github.com/hoseungme/storage-cover
javascript localstorage sessionstorage storage typescript web webstorage
Last synced: 16 days ago
JSON representation
Web storage wrapper for continuous web application in all browsers
- Host: GitHub
- URL: https://github.com/hoseungme/storage-cover
- Owner: hoseungme
- Created: 2022-04-15T08:42:11.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-10T20:16:35.000Z (over 2 years ago)
- Last Synced: 2024-04-26T01:22:20.361Z (10 months ago)
- Topics: javascript, localstorage, sessionstorage, storage, typescript, web, webstorage
- Language: TypeScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# storage-cover
Web Storage might not work because its implementation(e.g. incognito mode) is different by browsers. So developers should take these different implementations into account.```storage-cover``` is great solution for resolving this issue. ```storage-cover``` wraps Web Storage to prevent unexpected error and keep your web application continuous.
- zero dependencies
- easy to use
- support SSR```typescript
import { wrapLocalStorage, wrapSessionStorage } from "storage-cover";export const localStorage = wrapLocalStorage();
export const sessionStorage = wrapSessionStorage();
``````typescript
localStorage.set("SOME_KEY", "Hello, World!");
console.log(localStorage.get("SOME_KEY")); // Hello, World!
```