Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martinkr/jstorage
jStorage provides an convenient API for storing values. Use the same API for storing your data in localStorage, sessionStorage, cookies (bonus: cookies as localStorage/sessionStorage fallback!) and jQuery.data.
https://github.com/martinkr/jstorage
Last synced: 2 months ago
JSON representation
jStorage provides an convenient API for storing values. Use the same API for storing your data in localStorage, sessionStorage, cookies (bonus: cookies as localStorage/sessionStorage fallback!) and jQuery.data.
- Host: GitHub
- URL: https://github.com/martinkr/jstorage
- Owner: martinkr
- License: other
- Created: 2011-11-11T16:11:41.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2018-01-23T10:39:13.000Z (almost 7 years ago)
- Last Synced: 2024-10-09T19:54:21.045Z (2 months ago)
- Language: JavaScript
- Homepage: http://jquery.public.mkrause.info/
- Size: 462 KB
- Stars: 24
- Watchers: 5
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE.markdown
Awesome Lists containing this project
README
[jStorage](https://github.com/martinkr/jStorage)
=======
**jStorage provides an convenient API for storing values.
Use the same API for storing your data in localStorage, sessionStorage, cookies (bonus: cookies as localStorage/sessionStorage fallback!) and jQuery.data.**## Examples
### Create & Update:
jQuery.storage.setItem('key','value','localStorage|sessionStorage|cookie|data');### Delete
jQuery.storage.removeItem('key','localStorage|sessionStorage|cookie|data');### Read
jQuery.storage.getItem('key','localStorage|sessionStorage|cookie|data');### Length (returns the number of key/value pairs for this specific type)
jQuery.storage.length('localStorage|sessionStorage|cookie|data');Convenient: If you skip the last "type" parameter, jStorage automatically uses the last type you used to store your data with.
## Requires
* jQuery JavaScript Library - http://jquery.com/; Copyright 2010, John Resig; Dual licensed under the MIT or GPL Version 2 licenses - http://jquery.org/license
* jCookie JavaScript Library - http://jquery.com/; Copyright 2008-2011, Martin Krause; Dual licensed under the MIT or GPL Version 2 licenses## License
Dual licensed under the MIT and GPL licenses.* MIT - http://www.opensource.org/licenses/mit-license.php
* GNU - http://www.gnu.org/licenses/gpl-3.0.htmlCopyright (c) 2011Martin Krause (jquery.public.mkrause.info)