(baseUrl: string, key: string)
| 41 | } |
| 42 | |
| 43 | function cachePath(baseUrl: string, key: string): string { |
| 44 | const slug = baseUrl.replace(/[^a-zA-Z0-9]/g, "_"); |
| 45 | return join(CACHE_DIR, `${slug}__${key}.json`); |
| 46 | } |
| 47 | |
| 48 | function readCache<T>(path: string): T | undefined { |
| 49 | try { |
no outgoing calls
no test coverage detected