JSPM

@harshsrv/react-local-storage

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q22253F
  • License MIT

This module helps you to access Local Storage easily

Package Exports

  • @harshsrv/react-local-storage

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@harshsrv/react-local-storage) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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