Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
401 B ยท 18 lines
TypeScript
12345678910111213141516171819export function parseInputToProps( json: unknown, eventProps?: string[],): Record<string, unknown> { if (typeof json !== "object" || json === null) return {};
if (!eventProps) return {};
return eventProps.reduce( (acc, prop) => { if (prop in json) { acc[prop] = json[prop as keyof typeof json]; } return acc; }, {} as Record<string, unknown>, );}