{"ast":null,"code":"// TODO: use this instead\n// https://github.com/zeit/swr/blob/master/examples/axios-typescript/libs/useRequest.ts\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport fetch from 'isomorphic-unfetch';\nexport const fetcher = async (url, options) => {\n  const res = await fetch(process.env.API_URL + url, options);\n  const response = await res.json();\n  return response && 'data' in response ? response.data : response;\n};\nexport const blobFetcher = async (url, options) => {\n  const res = await fetch(process.env.API_URL + url, options);\n  return await res.blob();\n};\nexport const cycleFetcher = async (urls, options) => {\n  return await Promise.all(urls.map(url => fetcher(url, options)));\n};","map":null,"metadata":{},"sourceType":"module"}