cal.pub0.org/lib/event.ts

9 lines
337 B
TypeScript
Raw Normal View History

export function getEventName(
name: string | string[] | undefined,
eventTitle: string,
eventNameTemplate: string | null
) {
if (!name || !(typeof name === "string")) name = ""; // If name is not set or is not of proper type
return eventNameTemplate ? eventNameTemplate.replace("{USER}", name) : eventTitle + " with " + name;
2021-06-15 15:26:16 +00:00
}