@harshsrv/react-local-storage

    1.0.0 • Public • Published

    local-storage

    This module helps you to access Local Storage easily: ReactJS

    Install

    npm install localstorage

    Example

    import { localStorage } from 'localStorage';
    //save Object into local storage
    localStorage.setObj('user', {'foo':'bar'});
    // get object from local storage
    localStorage.getObj('user');
    // save string/number into local storage
    localStorage.set('name', 'harsh');
    //get value from local storage by key name
    localStorage.get('name');
    // remove item from local storage
    localStorage.remove('keyname');
    // clear local storage 
    localStorage.clear();

    License

    MIT

    Install

    npm i @harshsrv/react-local-storage

    DownloadsWeekly Downloads

    3

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.67 kB

    Total Files

    4

    Last publish

    Collaborators

    • harshsrv