I'm wondering if there are StringUtils similar to Java to perform some of the repetitive functionality. For example, isEmpty() needs to check for null, as well as undefined, as well as "".
I did find this project:
https://github.com/tejzpr/stringutils
But I'm curious about how it's done in a culturally TypeScript way?
public constructor(eventId: UUID, eventType: string, isJson: boolean) {
if (!eventType)
throw new Error("Type cannot be null, empty or whitespace");
this.eventId = eventId;
this.eventType = eventType;
this.isJson = isJson;
}