1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = isURL;
|
7 |
|
8 | const _isURL = require('is-url'); // Matches anchor (ie: #raptors)
|
9 |
|
10 |
|
11 | const ANCHOR_REGEXP = /^#/; // Matches scheme (ie: tel:, mailto:, data:, itms-apps:)
|
12 |
|
13 | const SCHEME_REGEXP = /^[a-z][a-z0-9\-+.]*:/i;
|
14 |
|
15 | function isURL(url) {
|
16 | return _isURL(url) || ANCHOR_REGEXP.test(url) || SCHEME_REGEXP.test(url);
|
17 | } |
\ | No newline at end of file |