@irsooti/localstorage-manager

1.1.5 • Public • Published

Localstorage manager CircleCI

The library is pretty simple, because is pretty similar to legacy localstorage api.

  • tryGetValue(property): provided function is used to get the object accessing to corresponding property (like localStorage.getItem());

  • setValue(propertyName, object): set a property name and put your object. That's it.

  • removeValue(property): It works like localStorage.removeItem

  • reset(): It works like localStorage.clear

  • tryParseLocalStorage(): It try to parse the whole localStorage

Events handler

  • localstoragemanager:change: The event is fired when a change occurs by localStorageManager, it returns an empty detail for now;
  • localstoragemanager:remove: The event is fired when a property is removed by localStorageManager and it returns a detail wich contains the key removed
  • localstoragemanager:set: The event is fired when a property is setted by localStorageManager and it returns a detail wich contains the key and the value added

Dependencies (2)

Dev Dependencies (3)

Package Sidebar

Install

npm i @irsooti/localstorage-manager

Weekly Downloads

0

Version

1.1.5

License

MIT

Unpacked Size

159 kB

Total Files

17

Last publish

Collaborators

  • irsooti