UNPKG

quasar-framework

Version:

Build responsive SPA, SSR, PWA, Hybrid Mobile Apps and Electron apps, all simultaneously using the same codebase

14 lines (11 loc) 330 B
import { isSSR, hasWebStorage } from './platform.js' import { getEmptyStorage, getStorage } from '../utils/web-storage.js' export default { install ({ $q }) { const storage = isSSR || !hasWebStorage ? getEmptyStorage() : getStorage('local') $q.localStorage = storage Object.assign(this, storage) } }