Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
var
www
web-koncept
server
node_modules
@sentry
utils
esm
File Content:
cache.js.map
{"version":3,"file":"cache.js","sources":["../../src/cache.ts"],"sourcesContent":["/**\n * Creates a cache that evicts keys in fifo order\n * @param size {Number}\n */\nexport function makeFifoCache<Key extends string, Value>(\n size: number,\n): {\n get: (key: Key) => Value | undefined;\n add: (key: Key, value: Value) => void;\n delete: (key: Key) => boolean;\n clear: () => void;\n size: () => number;\n} {\n // Maintain a fifo queue of keys, we cannot rely on Object.keys as the browser may not support it.\n let evictionOrder: Key[] = [];\n let cache: Record<string, Value> = {};\n\n return {\n add(key: Key, value: Value) {\n while (evictionOrder.length >= size) {\n // shift is O(n) but this is small size and only happens if we are\n // exceeding the cache size so it should be fine.\n const evictCandidate = evictionOrder.shift();\n\n if (evictCandidate !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete cache[evictCandidate];\n }\n }\n\n // in case we have a collision, delete the old key.\n if (cache[key]) {\n this.delete(key);\n }\n\n evictionOrder.push(key);\n cache[key] = value;\n },\n clear() {\n cache = {};\n evictionOrder = [];\n },\n get(key: Key): Value | undefined {\n return cache[key];\n },\n size() {\n return evictionOrder.length;\n },\n // Delete cache key and return true if it existed, false otherwise.\n delete(key: Key): boolean {\n if (!cache[key]) {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete cache[key];\n\n for (let i = 0; i < evictionOrder.length; i++) {\n if (evictionOrder[i] === key) {\n evictionOrder.splice(i, 1);\n break;\n }\n }\n\n return true;\n },\n };\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACO,SAAS,aAAa;AAC7B,EAAE,IAAI;AACN;;AAMA,CAAE;AACF;AACA,EAAE,IAAI,aAAa,GAAU,EAAE,CAAA;AAC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