localForage is a fast and simple storage library for JavaScript.localForage uses localStorage in browsers with no IndexedDB or WebSQL.
localforage.setItem('key', 'value', function (err) { // if err is non-null, we got an error localforage.getItem('key', function (err, value) { // if err is non-null, we got an error. otherwise, value is the value }); });
:Framework Support
AngularJS
Angular 4 and up
Backbone
Ember
Vue
TypeScript:
import localForage from "localforage";