0.0.7 • Published 11 months ago
ts-storage-wrapper v0.0.7
ts-storage-wrapper
Storage on in the browser is not so great. ts-storage-wrapper
gives you super powers.
Without ts-storage-wrapper
:
- 🚨
.getItem
requiresJSON.parse
to get the item
ts-storage-wrapper
smooths over these hard edges, just like a CSS reset does in the browser.
With ts-storage-wrapper
:
- ✅
.getItem
does not requiresJSON.parse
to get the item
Example
// Import in a single file, then across your whole project...
import StorageWrapper from "ts-storage-wrapper";
## Get Started
1. Install: `npm i ts-storage-wrapper`
This provides the types you intend and also signals to the developer that this is _slightly_ unsafe.