UNPKG

quasar-framework

Version:

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

18 lines (15 loc) 389 B
import { onSSR, hasWebStorage } from './platform.js' import { getEmptyStorage, getStorage } from '../utils/web-storage.js' export default { install ({ $q }) { if (onSSR) { $q.localStorage = getEmptyStorage() return } if (hasWebStorage()) { const storage = getStorage('local') $q.localStorage = storage Object.assign(this, storage) } } }