mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-01-29 00:12:30 -05:00
18 lines
553 B
TypeScript
18 lines
553 B
TypeScript
/**
|
|
* Utility class for conversion operations.
|
|
* TODO: make this a shared utility class in root /shared/ folder so we can reuse it between
|
|
* browser extension/mobile app and possibly WASM client.
|
|
*/
|
|
class ConversionUtility {
|
|
/**
|
|
* Normalize a username by converting it to lowercase and trimming whitespace.
|
|
* @param username The username to normalize.
|
|
* @returns The normalized username.
|
|
*/
|
|
public normalizeUsername(username: string): string {
|
|
return username.toLowerCase().trim();
|
|
}
|
|
}
|
|
|
|
export default new ConversionUtility();
|