Add list command

This commit is contained in:
Kallum Jones
2022-08-03 20:42:51 +01:00
parent b9c2f22de3
commit 66f4c2b289
6 changed files with 128 additions and 1 deletions

View File

@ -2,4 +2,11 @@ export default class Util {
static isArrayEmpty(array: Array<any> | undefined): boolean {
return array === undefined || array.length == 0;
}
static stringPrettyify(str: string): string {
return str // insert a space before all caps
.replace(/([A-Z])/g, ' $1')
// uppercase the first character
.replace(/^./, function(str){ return str.toUpperCase(); })
}
}