How to use the quasar-framework.LocalStorage.get function in quasar-framework

To help you get started, we’ve selected a few quasar-framework examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phpzm / quasar-boilerplate / src / app / infra / storage / index.js View on Github external
export const get = (index, keep = null) => {
  if (keep === true) {
    return parse(LocalStorage.get.item(index))
  }
  if (keep === false) {
    return parse(LocalStorage.get.item(index))
  }
  const local = LocalStorage.get.item(index)
  if (isValid(local)) {
    return local
  }
  const session = SessionStorage.get.item(index)
  if (isValid(session)) {
    return session
  }
}