@availity/localstorage-core
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.0 • Public • Published

    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.

    Install

    npm i @availity/localstorage-core

    DownloadsWeekly Downloads

    182

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    11.5 kB

    Total Files

    7

    Last publish

    Collaborators

    • dznjudo
    • availity-cicd-bot
    • tannerbyers
    • azeigler
    • coreycochran89
    • sharpie
    • robmcguinness
    • dnoler
    • jselden
    • cbaker1
    • twarner
    • gopro16
    • sepiac
    • gregmartdotin
    • hnicbaker
    • chrishavekost
    • jordan-a-young
    • thutto
    • pashatay