mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
1 line
2.2 KiB
JSON
1 line
2.2 KiB
JSON
{"ast":null,"code":"// Used https://github.com/thinkloop/multi-key-cache as inspiration\nvar multiKeyStore = {\n set: function set(cache, key1, key2, value) {\n var subCache = cache.get(key1);\n\n if (!subCache) {\n subCache = new Map();\n cache.set(key1, subCache);\n }\n\n subCache.set(key2, value);\n },\n get: function get(cache, key1, key2) {\n var subCache = cache.get(key1);\n return subCache ? subCache.get(key2) : undefined;\n },\n delete: function _delete(cache, key1, key2) {\n var subCache = cache.get(key1);\n subCache.delete(key2);\n }\n};\nexport default multiKeyStore;","map":{"version":3,"sources":["/app/node_modules/@material-ui/styles/esm/makeStyles/multiKeyStore.js"],"names":["multiKeyStore","set","cache","key1","key2","value","subCache","get","Map","undefined","delete","_delete"],"mappings":"AAAA;AACA,IAAIA,aAAa,GAAG;AAClBC,EAAAA,GAAG,EAAE,SAASA,GAAT,CAAaC,KAAb,EAAoBC,IAApB,EAA0BC,IAA1B,EAAgCC,KAAhC,EAAuC;AAC1C,QAAIC,QAAQ,GAAGJ,KAAK,CAACK,GAAN,CAAUJ,IAAV,CAAf;;AAEA,QAAI,CAACG,QAAL,EAAe;AACbA,MAAAA,QAAQ,GAAG,IAAIE,GAAJ,EAAX;AACAN,MAAAA,KAAK,CAACD,GAAN,CAAUE,IAAV,EAAgBG,QAAhB;AACD;;AAEDA,IAAAA,QAAQ,CAACL,GAAT,CAAaG,IAAb,EAAmBC,KAAnB;AACD,GAViB;AAWlBE,EAAAA,GAAG,EAAE,SAASA,GAAT,CAAaL,KAAb,EAAoBC,IAApB,EAA0BC,IAA1B,EAAgC;AACnC,QAAIE,QAAQ,GAAGJ,KAAK,CAACK,GAAN,CAAUJ,IAAV,CAAf;AACA,WAAOG,QAAQ,GAAGA,QAAQ,CAACC,GAAT,CAAaH,IAAb,CAAH,GAAwBK,SAAvC;AACD,GAdiB;AAelBC,EAAAA,MAAM,EAAE,SAASC,OAAT,CAAiBT,KAAjB,EAAwBC,IAAxB,EAA8BC,IAA9B,EAAoC;AAC1C,QAAIE,QAAQ,GAAGJ,KAAK,CAACK,GAAN,CAAUJ,IAAV,CAAf;AACAG,IAAAA,QAAQ,CAACI,MAAT,CAAgBN,IAAhB;AACD;AAlBiB,CAApB;AAoBA,eAAeJ,aAAf","sourcesContent":["// Used https://github.com/thinkloop/multi-key-cache as inspiration\nvar multiKeyStore = {\n set: function set(cache, key1, key2, value) {\n var subCache = cache.get(key1);\n\n if (!subCache) {\n subCache = new Map();\n cache.set(key1, subCache);\n }\n\n subCache.set(key2, value);\n },\n get: function get(cache, key1, key2) {\n var subCache = cache.get(key1);\n return subCache ? subCache.get(key2) : undefined;\n },\n delete: function _delete(cache, key1, key2) {\n var subCache = cache.get(key1);\n subCache.delete(key2);\n }\n};\nexport default multiKeyStore;"]},"metadata":{},"sourceType":"module"} |