better name
This commit is contained in:
@@ -25,7 +25,7 @@ export function sanitizeHandle(handle: string, prefix = ''): string {
|
|||||||
return isInvalidHandle(handle) ? '⚠Invalid Handle' : `${prefix}${handle}`
|
return isInvalidHandle(handle) ? '⚠Invalid Handle' : `${prefix}${handle}`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ValidHandleResult =
|
type ValidateHandleResult =
|
||||||
| 'charsError'
|
| 'charsError'
|
||||||
| 'hyphenError'
|
| 'hyphenError'
|
||||||
| 'frontLengthError'
|
| 'frontLengthError'
|
||||||
@@ -36,7 +36,7 @@ type ValidHandleResult =
|
|||||||
export function validateHandle(
|
export function validateHandle(
|
||||||
str: string,
|
str: string,
|
||||||
userDomain: string,
|
userDomain: string,
|
||||||
): ValidHandleResult {
|
): ValidateHandleResult {
|
||||||
const fullHandle = createFullHandle(str, userDomain)
|
const fullHandle = createFullHandle(str, userDomain)
|
||||||
|
|
||||||
if (str.length < 3) {
|
if (str.length < 3) {
|
||||||
|
|||||||
Reference in New Issue
Block a user