mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2026-01-17 03:52:26 +01:00
48 fix missing names in calendar module editor
This commit is contained in:
8
frontend/src/helpers/strings.ts
Normal file
8
frontend/src/helpers/strings.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Returns false only if the input argument is a string which contains characters that are not considered a whitespace
|
||||
* @param str - The string to check for whitespace
|
||||
* @returns boolean - true if the string contains only whitespace, false otherwise
|
||||
*/
|
||||
export function onlyWhitespace(str: string): boolean {
|
||||
return !str || str.length === 0 || /^\s*$/.test(str);
|
||||
}
|
||||
Reference in New Issue
Block a user