You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
326 B
20 lines
326 B
/**
|
|
* Created by PanJiaChen on 16/11/18.
|
|
*/
|
|
|
|
/**
|
|
* @param {string} path
|
|
* @returns {Boolean}
|
|
*/
|
|
export function isExternal(path) {
|
|
return /^(https?:|mailto:|tel:)/.test(path)
|
|
}
|
|
|
|
/**
|
|
* @param {string} str
|
|
* @returns {Boolean}
|
|
*/
|
|
export function validUsername(str) {
|
|
const valid = ''
|
|
return valid !== str.trim()
|
|
}
|
|
|