Calculate the likeness score of 2 URLs
Kind: static method of URLDiff
Returns: Number - The likeness score (0-1)
| Param | Type | Description |
|---|---|---|
| primaryURL | String |
The reference URL |
| secondaryURL | String |
URL to compare |
Sort an array of URLs or items containing URLs by how they score against a reference URL
Kind: static method of URLDiff
Returns: Array - Sorted and filtered results array
| Param | Type | Default | Description |
|---|---|---|---|
| referenceURL | String |
A URL to use as a reference | |
| arr | Array.<Object> | Array.<String> |
An array of URLs or items containing URLs | |
| [minScore] | Number |
0 |
The minimum comparison score, filtering out URL items that fall below it (default = 0) |
| [valueGetter] | function |
A getter function that can help return the value from an object or complex instance (defaults to returning the array element) |