Type-safe storage library with fallback values
MIT License
Type-safe storage library with fallback values
A simple library for interacting with the browser's local storage in a type-safe manner (with TypeScript).
npm install ts-storage --save
import * as Storage from "ts-storage";
Storage.set("foo", 5);
const foo = Storage.get("foo", 0).value;
// foo is guaranteed to be a number.