Files
ncd-fe/packages/pl-fe/src/utils/input.ts
nicole mikołajczyk 81132cbd57 nicolium: oxlint migration
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-02-15 13:18:46 +01:00

11 lines
256 B
TypeScript

/** Trim the username and strip the leading @. */
const normalizeUsername = (username: string): string => {
const trimmed = username.trim();
if (trimmed[0] === '@') {
return trimmed.slice(1);
}
return trimmed;
};
export { normalizeUsername };