Skip to content

Just a helper module to allow JSON objects to be saved to the localStorage object

License

Notifications You must be signed in to change notification settings

kevinrodriguez-io/persistence.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

persistence.js

This is just a helper javascript module to allow JSON objects to be stored on the localStorage object.

Coming soon:

  • Cookies failover
  • Allow to choose between localStorage and sessionStorage

Usage

To save a JSON object:

var johnDoe = { name: 'John', lastName: 'Doe' }

LocalStoragePersistence.saveJsonObject('userData-johnDoe', johnDoe)

To retrieve a JSON object:

var johnDoe = LocalStoragePersistence.loadJsonObject('userData-johnDoe')

About

Just a helper module to allow JSON objects to be saved to the localStorage object

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published