48 fix missing names in calendar module editor

This commit is contained in:
survellow
2023-11-07 23:23:09 +01:00
parent fafdd96d89
commit 065dd54478
3 changed files with 23 additions and 2 deletions

View 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);
}