LinkAnalyzer
Hold logic about recursive links processing
Constructor Summary
Public Constructor | ||
public |
constructor(initial: String, options: Object) Initialize predefined skip rules for prevent deeper crawling for given url |
Member Summary
Public Members | ||
public get |
options: BasedOption: * Returns options model |
|
public get |
Returns initial url as parsed url string via Url module |
Private Members | ||
private |
_options: * |
|
private |
Parsed url object from Url.parse |
Method Summary
Public Methods | ||
public |
isExternal(url: String): boolean Checks if given url is external |
|
public |
isNeedToSkipUrl(url: String, baseUrl: String): boolean Returns true if anyone of skip conditions returns true |
Private Methods | ||
private |
_skipExcludedUrls(url: String): boolean Checks if given url has host different then host of initial url |
|
private |
_skipExternalUrls(url: String): boolean Checks if given url has the different hostname then initial |
|
private |
Check if protocol of given url satisfies acceptedSchemes criteria |
|
private |
_skipOnMode(url: *, baseUrl: *): boolean: boolean Checks if given url is need to be check depending on mode configuration option |
Public Constructors
Public Members
Private Members
private _options: * source
Public Methods
public isExternal(url: String): boolean source
Checks if given url is external
Params:
Name | Type | Attribute | Description |
url | String | request url |
public isNeedToSkipUrl(url: String, baseUrl: String): boolean source
Returns true if anyone of skip conditions returns true
Private Methods
private _skipExcludedUrls(url: String): boolean source
Checks if given url has host different then host of initial url
Params:
Name | Type | Attribute | Description |
url | String | request |
private _skipExternalUrls(url: String): boolean source
Checks if given url has the different hostname then initial (If 'checkExternalUrls'rule is set to true)
Params:
Name | Type | Attribute | Description |
url | String | request url |