@gibme/local-storage
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

Simple Local Storage Helper

Static wrapper around a browser's localStorage that falls back to File based storage in the host's temporary directory.

Such storage is generally persistent across pages within a domain; and, if file based, across application executions.

Documentation

https://gibme-npm.github.io/local-storage/

Sample Code

import LocalStorage from '@gibme/local-storage';

LocalStorage.set('somekey', 'somevalue');

if (LocalStorage.has('somekey')) {
    console.log(LocalStorage.get<string>('somekey'));
    
    LocalStorage.remove('somekey');
}

Readme

Keywords

none

Package Sidebar

Install

npm i @gibme/local-storage

Weekly Downloads

66

Version

1.0.12

License

MIT

Unpacked Size

195 kB

Total Files

12

Last publish

Collaborators

  • brandonlehmann