https://github.com/maxigimenez/keepit
localStorage wrapper with expiration time
https://github.com/maxigimenez/keepit
Last synced: about 12 hours ago
JSON representation
localStorage wrapper with expiration time
- Host: GitHub
- URL: https://github.com/maxigimenez/keepit
- Owner: maxigimenez
- Created: 2014-07-01T00:49:54.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-07-14T07:45:44.000Z (almost 11 years ago)
- Last Synced: 2025-02-26T21:05:59.664Z (over 1 year ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
keepit
====================
Is a minimal API wrapper for localStorage with the big featured of set data with expiration time expressed in hours.
##Download
The source is available for download from [Github](https://github.com/maxigimenez/keepit), and you can using [Bower](http://bower.io/).
```
bower install keepit
```
##In the browser
Usage:
```html
keepit.set('dummykey', 'dummyvalue');
console.log(keepit.get('dummykey'));
```
##How to use
```js
keepit.set(key, value, expiration);
keepit.get(key);
keepit.getAll();
keepit.delete(key);
keepit.flush();
```