import { getHeaders } from "./get-headers.js";
export function isPrefetch(requestOrHeaders) {
  let headers = getHeaders(requestOrHeaders);
  let purpose =
    headers.get("Purpose") ||
    headers.get("X-Purpose") ||
    headers.get("Sec-Purpose") ||
    headers.get("Sec-Fetch-Purpose") ||
    headers.get("Moz-Purpose") ||
    headers.get("X-Moz");
  return purpose?.toLowerCase() === "prefetch";
}
