Urls checks.
- Source:
Methods
(inner) domain(value) → {boolean}
Check if is a valid domain
Interfaces: all
, any
, not
, err
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
url |
Returns:
- Type:
-
boolean
Example
be.domain('google.com') // true;
be.domain('image.google.com') // true;
(inner) ftpsUrl(value) → {boolean}
Check if is a FTPS urls
Interfaces: all
, any
, not
, err
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
url |
Returns:
- Type:
-
boolean
Example
be.ftpsUrl('ftps://ftp.google.com') // true;
be.not.ftpsUrl('ftps://ftp.google.com') // false;
be.any.ftpsUrl('ftps://ftp.google.com', 'http://') // true;
be.all.ftpsUrl('ftps://ftp.google.com', 'http://') // false;
(inner) ftpUrl(value) → {boolean}
Check if is a FTP urls
Interfaces: all
, any
, not
, err
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
url |
Returns:
- Type:
-
boolean
Example
be.ftpUrl('ftp://ftp.google.com') // true;
be.not.ftpUrl('ftp://ftp.google.com') // false;
be.any.ftpUrl('ftp://ftp.google.com', 'http://') // true;
be.all.ftpUrl('ftp://ftp.google.com', 'http://') // false;
(inner) httpsUrl(value) → {boolean}
Check if is a HTTPS url
Interfaces: all
, any
, not
, err
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
url |
Returns:
- Type:
-
boolean
Example
be.httpsUrl('https://www.google.com') // true;
be.not.httpsUrl('https://www.google.com') // false;
be.any.httpsUrl('https://www.google.com', 'http://') // true;
be.all.httpsUrl('https://www.google.com', 'http://') // false;
(inner) httpUrl(value) → {boolean}
Check if is a HTTP url
Interfaces: all
, any
, not
, err
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
url |
Returns:
- Type:
-
boolean
Example
be.httpUrl('http://www.google.com') // true;
be.not.httpUrl('http://www.google.com') // false;
be.any.httpUrl('http://www.google.com', 'http://') // true;
be.all.httpUrl('http://www.google.com', 'http://') // false;
(inner) url(value) → {boolean}
Check if is valid string url
Interfaces: all
, any
, not
, err
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
url |
Returns:
- Type:
-
boolean
Example
be.url('http://www.google.com') // true;
be.not.url('http://www.google.com') // false;
be.any.url('http://www.google.com', 'http://') // true;
be.all.url('http://www.google.com', 'http://') // false;
(inner) urlEncoded(value) → {boolean}
Check if url is encoded
Interfaces: all
, any
, not
, err
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
url encoded |
Returns:
- Type:
-
boolean
Example
be.urlEncoded('http://ja.wikipedia.org/wiki/%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%9A%E3%83%BC%E3%82%B8') // true