homebox/frontend/composables/use-strings.ts
Hayden 75c633dcb5
frontend: cleanup
* dummy commit

* cleanup workflows

* setup and run eslint

* add linter to CI

* use eslint for formatting

* reorder rules

* drop editor config
2022-09-09 14:46:53 -08:00

7 lines
227 B
TypeScript

export function truncate(str: string, length: number) {
return str.length > length ? str.substring(0, length) + "..." : str;
}
export function capitalize(str: string) {
return str.charAt(0).toUpperCase() + str.slice(1);
}