Sha256: 78b616b12736768ffc28263d52ad0bf590b96097e61eff4aed5548663bacdcf8
Contents?: true
Size: 551 Bytes
Versions: 78
Compression:
Stored size: 551 Bytes
Contents
'use strict'; var lalala_storage; // Get lalala storage object from local storage try { lalala_storage = JSON.parse(localStorage.lalala); } catch(error) { console.error(error); } // If lalala storage doesn't exist, create empty object if (!lalala_storage) { lalala_storage = {}; } /** * On window unload save lalala storage object to local storage */ $(window).unload(function(){ console.log("storage save"); localStorage.lalala = JSON.stringify(lalala_storage); }); /** * @export {Object} */ module.exports = lalala_storage;
Version data entries
78 entries across 78 versions & 1 rubygems