Skip to content

Instantly share code, notes, and snippets.

@bradoyler bradoyler/idb-keyval.js
Last active Mar 16, 2018

Embed
What would you like to do?
A Vue.js plugin for idb-keyval

Vue-idb-keyval

A Vue.js plugin for idb-keyval

Setup

copy idb-keyval.js to your plugins folder in your vue app

Usage

import Vue from 'vue';
import $idb from './plugins/idb-keyval';

Vue.use($idb);

// then just use the $idb global in your Vue app
Vue.$idb.set('my.key', 'my value')
import idb from 'idb-keyval';
export default {
install (Vue, options) {
Vue.prototype.$idb = idb;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.