Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

430 B
Raw Blame
import type { ResourceId } from "@hypit/protocol";

/** Test-only resource identity. It is readable and intentionally unrelated to byte content. */
export function fixtureResource(value: unknown): ResourceId {
  const text = typeof value === "string" ? value : JSON.stringify(value);
  const safe = text.replace(/[^a-zA-Z0-9._:-]+/gu, "_").replace(/^_+|_+$/gu, "");
  return `res_fixture:${safe.length === 0 ? "value" : safe}`;
}