Rocky_Mountain_Vending/.pnpm-store/v10/files/e6/ad513b3748e8ed39b80d18c5725d38fb0c6b6122c69f6b87a858f62e35baadac3a5198b462fe5cc226c70dd227d77c35d984aea1ece86728ff83d9e0a8683a
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

1 line
No EOL
3.1 KiB
Text

{"version":3,"file":"lru.js","sources":["../../../src/utils/lru.ts"],"sourcesContent":["/** A simple Least Recently Used map */\nexport class LRUMap<K, V> {\n private readonly _cache: Map<K, V>;\n\n public constructor(private readonly _maxSize: number) {\n this._cache = new Map<K, V>();\n }\n\n /** Get the current size of the cache */\n public get size(): number {\n return this._cache.size;\n }\n\n /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */\n public get(key: K): V | undefined {\n const value = this._cache.get(key);\n if (value === undefined) {\n return undefined;\n }\n // Remove and re-insert to update the order\n this._cache.delete(key);\n this._cache.set(key, value);\n return value;\n }\n\n /** Insert an entry and evict an older entry if we've reached maxSize */\n public set(key: K, value: V): void {\n if (this._cache.size >= this._maxSize) {\n // keys() returns an iterator in insertion order so keys().next() gives us the oldest key\n this._cache.delete(this._cache.keys().next().value);\n }\n this._cache.set(key, value);\n }\n\n /** Remove an entry and return the entry if it was in the cache */\n public remove(key: K): V | undefined {\n const value = this._cache.get(key);\n if (value) {\n this._cache.delete(key);\n }\n return value;\n }\n\n /** Clear all entries */\n public clear(): void {\n this._cache.clear();\n }\n\n /** Get all the keys */\n public keys(): Array<K> {\n return Array.from(this._cache.keys());\n }\n\n /** Get all the values */\n public values(): Array<V> {\n const values: V[] = [];\n this._cache.forEach(value => values.push(value));\n return values;\n }\n}\n"],"names":[],"mappings":"AAAA;AACO,MAAM,MAAM,CAAO;;AAG1B,GAAS,WAAW,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