{"version":3,"file":"localstorage.min.js","sources":["https:\/\/lms.innovativelearning.eu\/lib\/amd\/src\/localstorage.js"],"sourcesContent":["\/\/ This file is part of Moodle - http:\/\/moodle.org\/\n\/\/\n\/\/ Moodle is free software: you can redistribute it and\/or modify\n\/\/ it under the terms of the GNU General Public License as published by\n\/\/ the Free Software Foundation, either version 3 of the License, or\n\/\/ (at your option) any later version.\n\/\/\n\/\/ Moodle is distributed in the hope that it will be useful,\n\/\/ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\/\/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\/\/ GNU General Public License for more details.\n\/\/\n\/\/ You should have received a copy of the GNU General Public License\n\/\/ along with Moodle. If not, see .\n\n\/**\n * Simple API for set\/get to localstorage, with cacherev expiration.\n *\n * @module core\/localstorage\n * @class localstorage\n * @copyright 2015 Damyon Wiese \n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n * @since 2.9\n *\/\ndefine(['core\/config', 'core\/storagewrapper'], function(config, StorageWrapper) {\n\n \/\/ Private functions and variables.\n \/** @var {Object} StorageWrapper - Wraps browsers localStorage object *\/\n var storage = new StorageWrapper(window.localStorage);\n\n return \/** @alias module:core\/localstorage *\/ {\n \/**\n * Get a value from local storage. Remember - all values must be strings.\n *\n * @method get\n * @param {string} key The cache key to check.\n * @return {boolean|string} False if the value is not in the cache, or some other error - a string otherwise.\n *\/\n get: function(key) {\n return storage.get(key);\n },\n\n \/**\n * Set a value to local storage. Remember - all values must be strings.\n *\n * @method set\n * @param {string} key The cache key to set.\n * @param {string} value The value to set.\n * @return {boolean} False if the value can't be saved in the cache, or some other error - true otherwise.\n *\/\n set: function(key, value) {\n return storage.set(key, value);\n }\n\n };\n});\n"],"names":["define","config","StorageWrapper","storage","window","localStorage","get","key","set","value"],"mappings":";;;;;;;;;AAwBAA,2BAAO,CAAC,cAAe,wBAAwB,SAASC,OAAQC,oBAIxDC,QAAU,IAAID,eAAeE,OAAOC,oBAEM,CAQ1CC,IAAK,SAASC,YACHJ,QAAQG,IAAIC,MAWvBC,IAAK,SAASD,IAAKE,cACRN,QAAQK,IAAID,IAAKE"}