-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.js
16 lines (12 loc) · 869 Bytes
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const url_validator = require("./url-validator");
// Test match function
console.log(url_validator.match("https://google.com/first/second/third and site.com/test"));
// Test has function
console.log(url_validator.has("1 https://google.com/first/second/third 2"));
// Test exact function
console.log(url_validator.exact("!!!!"));
console.log(url_validator.exact("https://google.com/first/second/third"));
// Test includes function
console.log(url_validator.includes("first https://google.com/first/second/third second google.com sallam.org bye.net", "https://google.com/first/second/third"));
console.log(url_validator.includes("first https://google.com/first/second/third second google.com sallam.org bye.net", "bye.net"));
console.log(url_validator.includes("first https://google.com/first/second/third second google.com sallam.org bye.net", "xxxxxxxxxxxx.net"));