INNER CODE UNIT · TypeScript

getEpisodeCacheKey

beeequeue/yuna · src/utils/index.ts:172

export const getEpisodeCacheKey = (ep: EpisodeListEpisodes) =>
  `Episode:${ep.provider}:${ep.id}`

export const removeCookies = async (filter: CookiesGetFilter) => {
  if (isNil(session)) return

  if (!session.defaultSession) {
    // eslint-disable-next-line no-console
    return console.warn(`Could not get default session when deleting cookie.\n${filter}`)
  }

  const cookies = await session.defaultSession.cookies.get(filter)

  cookies.forEach((cookie) => {
    if (!cookie.domain) return

    const prefix = cookie.domain.includes("crunchyroll") ? "api." : ""
    const url = "https://" + prefix + cookie.domain.replace(/^\./, "")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…