|
|
|
|
@ -4,7 +4,3 @@ export function isExternal(path: string): boolean {
|
|
|
|
|
export function isExternalIcon(path: string): boolean {
|
|
|
|
|
return /^(\/)+([a-zA-Z0-9\s_\\.\-():/])+(.svg|.png|.jpg)$/g.test(path) || /^(https?:|mailto:|tel:)/.test(path)
|
|
|
|
|
}
|
|
|
|
|
export function validUsername(str: string): boolean {
|
|
|
|
|
const validMap = ['admin', 'editor']
|
|
|
|
|
return validMap.indexOf(str.trim()) >= 0
|
|
|
|
|
}
|
|
|
|
|
|