ts-storage
TypeScript icon, indicating that this package has built-in type declarations

5.0.1 • Public • Published

ts-storage

Type-safe storage library with fallback values

NPM Version Downloads Stats

A simple library for interacting with the browser's local storage in a type-safe manner (with TypeScript).

Installation

npm install ts-storage --save

Usage

import * as Storage from "ts-storage";
 
Storage.set("foo", 5);
 
const foo = Storage.get("foo", 0).value;
// foo is guaranteed to be a number.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
5.0.162latest

Version History

VersionDownloads (Last 7 Days)Published
5.0.162
5.0.00
4.0.00
3.1.00
3.0.00
2.0.00
1.0.10
1.0.01
0.2.00
0.1.00

Package Sidebar

Install

npm i ts-storage

Weekly Downloads

63

Version

5.0.1

License

MIT

Unpacked Size

18.3 kB

Total Files

8

Last publish

Collaborators

  • alling