Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
export 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>,
);
}