Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*jshint unused:false */
- (function (exports) {
- 'use strict';
- var STORAGE_KEY = 'data';
- exports.localStorage = {
- fetch: function () {
- return JSON.parse(localStorage.getItem(STORAGE_KEY) || '[]');
- },
- save: function (data) {
- localStorage.setItem(STORAGE_KEY, JSON.stringify(data));
- }
- };
- })(window);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement