15815213711
2024-08-26 67b8b6731811983447e053d4396b3708c14dfe3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
 * Check if the string is an URL.
 *
 * @param [options] - Options
 */
export default function isURL(str: string, options?: IsURLOptions): boolean;
 
export interface IsURLOptions {
    /**
     * @default ['http','https','ftp']
     */
    protocols?: string[] | undefined;
    /**
     * @default true
     */
    require_tld?: boolean | undefined;
    /**
     * @default false
     */
    require_protocol?: boolean | undefined;
    /**
     * @default true
     */
    require_host?: boolean | undefined;
    /**
     * if set as true isURL will check if port is present in the URL
     * @default false
     */
    require_port?: boolean | undefined;
    /**
     * @default true
     */
    require_valid_protocol?: boolean | undefined;
    /**
     * @default false
     */
    allow_underscores?: boolean | undefined;
    /**
     * @default false
     */
    host_whitelist?: Array<string | RegExp> | undefined;
    /**
     * @default false
     */
    host_blacklist?: Array<string | RegExp> | undefined;
    /**
     * @default false
     */
    allow_trailing_dot?: boolean | undefined;
    /**
     * @default false
     */
    allow_protocol_relative_urls?: boolean | undefined;
    /**
     * @default false
     */
    disallow_auth?: boolean | undefined;
    /**
     * @default true
     */
    allow_fragments?: boolean | undefined;
    /**
     * @default true
     */
    allow_query_components?: boolean | undefined;
    /**
     * @default true
     */
    validate_length?: boolean | undefined;
}