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
429 B
20 lines
429 B
function test (){
|
|
console.log('test方法');
|
|
}
|
|
|
|
function IsURL(str_url) {
|
|
return (/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/gm).test(str_url);
|
|
}
|
|
|
|
function AnalysisURL(url) {
|
|
return /^(https?:\/\/)([0-9a-z.]+)(:[0-9]+)?([/0-9a-z.]+)?(\?[0-9a-z&=]+)?(#[0-9-a-z]+)?/i.exec(url);
|
|
}
|
|
|
|
|
|
const permission = {
|
|
test:test,
|
|
IsURL:IsURL,
|
|
AnalysisURL:AnalysisURL
|
|
}
|
|
|
|
module.exports = permission
|