@availity/localstorage-core
Wraps localStorage with utility functions
Last updated a year ago by availity-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @availity/localstorage-core 
SYNC missed versions from official npm registry.

localstorage-core

Wraps localStorage with utility functions

Version

Install

npm install @availity/localstorage-core --save

Usage

import * as avLocalStorage from '@availity/localstorage-core';

avLocalStorage.set('myKey', 'myValue');
console.log(avLocalStorage.get('myKey')); // logs: "myValue"

Methods

get(key)

Returns value stored at key, will attempt to parse JSON stored there.

set(key, value)

Sets key to value in localStorage. Will stringify objects if needed.

remove(key)

Removes key from localStorage.

getKeys(searchKey)

Returns array of all keys that match the searchKey string or RegExp.

removeKeys(searchKey)

Remove all keys that match the searchKey string or RegExp.

getSessionBust()

Returns session key set by Availity on login.

Current Tags

  • 4.0.0-alpha.19                                ...           canary (a year ago)
  • 3.0.0                                ...           latest (a year ago)

26 Versions

  • 4.0.0-alpha.19                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.6.1                                ...           2 years ago
  • 2.5.1-alpha.454                                ...           2 years ago
  • 2.5.0                                ...           2 years ago
  • 1.4.0                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 1.0.0-alpha.17                                ...           3 years ago
  • 1.0.0-alpha.16                                ...           3 years ago
  • 1.0.0-alpha.15                                ...           3 years ago
  • 1.0.0-alpha.14                                ...           3 years ago
  • 1.0.0-alpha.13                                ...           3 years ago
  • 1.0.0-alpha.12                                ...           3 years ago
  • 1.0.0-alpha.11                                ...           3 years ago
  • 1.0.0-alpha.10                                ...           3 years ago
  • 1.0.0-alpha.9                                ...           3 years ago
  • 1.0.0-alpha.8                                ...           3 years ago
  • 1.0.0-alpha.7                                ...           3 years ago
  • 1.0.0-alpha.6                                ...           3 years ago
  • 1.0.0-alpha.5                                ...           3 years ago
  • 1.0.0-alpha.4                                ...           3 years ago
  • 1.0.0-alpha.3                                ...           3 years ago
  • 1.0.0-alpha.2                                ...           3 years ago
  • 1.0.0-alpha.1                                ...           3 years ago
  • 1.0.0-alpha.0                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |