HLSDownloaderUtils
Utility module for HLSDownloader
- Source
Methods
(static) isNotFunction(fn) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
fn | function | function to validate |
- Source
Returns:
- Type:
- boolean
(static) isValidPlaylist(playlistContent) → {boolean}
Validate a Playlist
Parameters:
Name | Type | Description |
---|---|---|
playlistContent | string | Content of playlist file |
- Source
Returns:
- Type:
- boolean
(static) isValidUrl(url, protocolsopt) → {boolean}
Check if the url is valid
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url | string | string to check | |
protocols | Array.<string> | <optional> | supported protocols |
- Source
Throws:
TypeError
ProtocolNotSupported
Returns:
- Type:
- boolean
(static) omit(…keys, subject) → {object}
omit given keys from an object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
keys | any | <repeatable> | keys to remove from the object |
subject | object | object to remove the keys form |
- Source
Returns:
- Type:
- object
(static) parseUrl(url) → {object}
Validate a Playlist
Parameters:
Name | Type | Description |
---|---|---|
url | string | url to parse |
- Source
Throws:
TypeError
Returns:
- Type:
- object
(static) stripFirstSlash(url) → {String}
Strip first slash from a url / path
Parameters:
Name | Type | Description |
---|---|---|
url | String | URL to strip the slash |
- Source
Returns:
Stripped url
- Type:
- String