Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

492 B
Raw Blame
/** URL text of a fetch() input captured by a test double. */
export const requestUrlText = (input: string | URL | Request): string =>
  typeof input === "string"
    ? input
    : input instanceof URL
      ? input.href
      : input.url;

/** String body of a fetch() init captured by a test double. */
export const requestBodyText = (body: RequestInit["body"]): string => {
  if (typeof body !== "string") {
    throw new TypeError("Expected a string request body");
  }
  return body;
};