Sha256: 28b6d22b23bdae4832c0eb6b95bc53f2c47b352190a60498f16ece30df42bc94

Contents?: true

Size: 375 Bytes

Versions: 76

Compression:

Stored size: 375 Bytes

Contents

export class LocalStorageService {
  prefix = 'avo'

  prefixedKey(key) {
    return `${this.prefix}.${key}`
  }

  get(key) {
    return window.localStorage.getItem(this.prefixedKey(key))
  }

  set(key, value) {
    return window.localStorage.setItem(this.prefixedKey(key), value)
  }

  remove(key) {
    return window.localStorage.removeItem(this.prefixedKey(key))
  }
}

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
avo-3.14.3 app/javascript/js/local-storage-service.js
avo-3.14.2 app/javascript/js/local-storage-service.js
avo-3.14.1 app/javascript/js/local-storage-service.js
avo-3.14.0 app/javascript/js/local-storage-service.js
avo-3.13.7 app/javascript/js/local-storage-service.js
avo-3.13.6 app/javascript/js/local-storage-service.js
avo-3.13.5 app/javascript/js/local-storage-service.js
avo-3.13.4 app/javascript/js/local-storage-service.js
avo-3.13.3 app/javascript/js/local-storage-service.js
avo-3.13.2 app/javascript/js/local-storage-service.js
avo-3.13.1 app/javascript/js/local-storage-service.js
avo-3.13.0 app/javascript/js/local-storage-service.js
avo-3.12.0 app/javascript/js/local-storage-service.js
avo-3.11.10 app/javascript/js/local-storage-service.js
avo-3.11.9 app/javascript/js/local-storage-service.js
avo-3.11.8 app/javascript/js/local-storage-service.js
avo-3.11.7 app/javascript/js/local-storage-service.js
avo-3.11.6 app/javascript/js/local-storage-service.js
avo-3.11.5 app/javascript/js/local-storage-service.js
avo-3.11.4 app/javascript/js/local-storage-service.js