Global

Type Definitions

configurationObject

Description:
  • A plain object containing configuration information for customising Linkifier objects and commandline interface (CLI) options.

Source:
See:
  • module:cli
Properties:
Name Type Attributes Description
linkifier module:linkifier-class.Linkifier <optional>

a configured linkifier.

options Object <optional>

values for the options accepted by the CLI's generate command.

A plain object containing configuration information for customising Linkifier objects and commandline interface (CLI) options.

Type:
  • Object

dataTransformer(pData) → {module:link-data.LinkData}

Description:
  • Functions for converting information extracted from a web page into the information used to render links.

Source:
Parameters:
Name Type Description
pData module:page-data.PageData

The web page data to be transrormed to link data.

Returns:

The link information derived from the page data.

Type
module:link-data.LinkData

extraFieldExtractorFunction(pageDOM) → {Object.<string, string>}

Description:
  • A function that can optionally be added to a template to facilitate the extraction of exta data fields from web pages that can then be utilised by the template to render the link.

Source:
Parameters:
Name Type Description
pageDOM module:cheerio

the parsed webpage content

Returns:
Type
Object.<string, string>

pageMetadataObject

Description:
  • A page metadata object. Each key represents one of the standard or pseudo-standard HTML metadata fields.

Source:
See:
Properties:
Name Type Description
author string
creator string
description string
keywords Array.<string>
publisher string

A page metadata object. Each key represents one of the standard or pseudo-standard HTML metadata fields.

Type:
  • Object.<string, string>

plainLinkInformationObject

Description:
  • A plain object represeting the information about about link that can get utilised in a template.

    Note that the uri could contain more fields - it's initialised with output from the URI.parse() function from the URI module.

Source:
See:
Properties:
Name Type Description
url string

the URL for the link.

text string

the text for the link.

description string

a description for the link.

extraFields Object.<string, string>

any extra fields extracted from the page source.

uri Object

the URL's components

Properties
Name Type Description
hostname string

the hostname part of the URL.

path string

the path part of the UL, / for an empty path.

hasPath boolean

whether or not the URL has a path, note that / is considered no path.

A plain object represeting the information about about link that can get utilised in a template.

Note that the uri could contain more fields - it's initialised with output from the URI.parse() function from the URI module.

Type:
  • Object

plainPageInformationObject

Description:
  • A plain object representing the infomration extracted from a web page.

    Note that the uri could contain more fields - it's initialised with output from the URI.parse() function from the URI module.

Source:
See:
Properties:
Name Type Description
url string

the page's URL.

title string

the page's title.

metadata pageMetadataObject

the metadata extracted from the <meta> tags in the page's <head> tag.

topLevelHeadings Array.<string>

the text from the page's <h1> tags.

secondaryHeadings Array.<string>

text from the page's <h2> tags.

mainHeading string

the text from the most semantically important heading that exists in the page.

extraFields Object.<string, string>

any extra fields extracted from the page source.

uri Object

the URL's components

Properties
Name Type Description
hostname string

the hostname part of the URL.

path string

the path part of the UL, / for an empty path.

hasPath boolean

whether or not the URL has a path, note that / is considered no path.

A plain object representing the infomration extracted from a web page.

Note that the uri could contain more fields - it's initialised with output from the URI.parse() function from the URI module.

Type:
  • Object

templateFieldFilterFunction(originalString) → {string}

Description:
  • Functions for filtering template field values before their use to render links. Arbitrarily many of these functions can be added to a template in order to filter individual fields, or all fields.

Source:
Parameters:
Name Type Description
originalString string

the original value for the field to be filtered.

Returns:

the filtered version of the original string.

Type
string

templateFieldFilterTuple

Description:
  • A tupple (array of length exactly two) for assigning a field filter to a template.

Source:
Properties:
Name Type Description
0 "all" | "url" | "text" | "description"

the property the filter should be applied to.

1 templateFieldFilterFunction

the filter function to apply.

A tupple (array of length exactly two) for assigning a field filter to a template.

Type:
  • Array