(url)
| 8 | |
| 9 | const cache = {}; |
| 10 | export const fetchWithCache = async (url) => { |
| 11 | if (cache[url]) { |
| 12 | return cache[url]; |
| 13 | } |
| 14 | const data = await fetch(url).then((res) => res.json()); |
| 15 | cache[url] = data; |
| 16 | return data; |
| 17 | }; |
| 18 | |
| 19 | function removeEndingSlashObject(rpc) { |
| 20 | if (typeof rpc === "string") { |
no outgoing calls
no test coverage detected