hz-zhhq-web/node_modules/.cache/babel-loader/a2c3aac538338c8d2446b0c66ca...

1 line
2.2 KiB
JSON

{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\src\\utils\\cache.js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\utils\\cache.js","mtime":1737610069398},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000}],"contextDependencies":[],"result":["var sessionCache = {\n set: function set(key, value) {\n if (!sessionStorage) {\n return;\n }\n if (key != null && value != null) {\n sessionStorage.setItem(key, value);\n }\n },\n get: function get(key) {\n if (!sessionStorage) {\n return null;\n }\n if (key == null) {\n return null;\n }\n return sessionStorage.getItem(key);\n },\n setJSON: function setJSON(key, jsonValue) {\n if (jsonValue != null) {\n this.set(key, JSON.stringify(jsonValue));\n }\n },\n getJSON: function getJSON(key) {\n var value = this.get(key);\n if (value != null) {\n return JSON.parse(value);\n }\n },\n remove: function remove(key) {\n sessionStorage.removeItem(key);\n }\n};\nvar localCache = {\n set: function set(key, value) {\n if (!localStorage) {\n return;\n }\n if (key != null && value != null) {\n localStorage.setItem(key, value);\n }\n },\n get: function get(key) {\n if (!localStorage) {\n return null;\n }\n if (key == null) {\n return null;\n }\n return localStorage.getItem(key);\n },\n setJSON: function setJSON(key, jsonValue) {\n if (jsonValue != null) {\n this.set(key, JSON.stringify(jsonValue));\n }\n },\n getJSON: function getJSON(key) {\n var value = this.get(key);\n if (value != null) {\n return JSON.parse(value);\n }\n },\n remove: function remove(key) {\n localStorage.removeItem(key);\n }\n};\nexport default {\n /**\r\n * 会话级缓存\r\n */\n session: sessionCache,\n /**\r\n * 本地缓存\r\n */\n local: localCache\n};",null]}