Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
TypeScript
1234567891011import { defineParams } from "@sveltejs/kit/params";import { parseRawCommit } from "#lib/api/rawCommit.ts";
// requiring the hash here means refs that are not hashes fall through to the// commit pageconst matchRawCommit = (param: string) => parseRawCommit(param) !== null;
export const params = defineParams({ rawCommit: (param) => (matchRawCommit(param) ? param : undefined)});