.
This commit is contained in:
12
src/utils/validate.ts
Normal file
12
src/utils/validate.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Created by PanJiaChen on 16/11/18.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function isExternal(path : string) {
|
||||
return /^(https?:|mailto:|tel:)/.test(path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user