defaults

Default values used by the various functions and classes.

The defaults are collected here for clarity, helping module users both understand the defaults, and, make informed decisions about which defaults to augment or override completely.

Description:
  • Default values used by the various functions and classes.

    The defaults are collected here for clarity, helping module users both understand the defaults, and, make informed decisions about which defaults to augment or override completely.

Source:

Requires

Members

(static, constant) configFilename :string

Description:
  • The file name to to try read the config from in the user's home directory.

Source:
Default Value:
  • ".linkify-config.mjs"
See:

The file name to to try read the config from in the user's home directory.

Type:
  • string

(static, constant) extraSmallWords :Array.<string>

Description:
  • When converting strings to title case, some joiner words should be preserved in all lower case. The Title Case module handles most appropriately, but not all. These are the additional words that also treated as so-called small words by the functions in the utility module.

Source:
See:

When converting strings to title case, some joiner words should be preserved in all lower case. The Title Case module handles most appropriately, but not all. These are the additional words that also treated as so-called small words by the functions in the utility module.

Type:
  • Array.<string>

(static, constant) importedSmallWords :Array.<string>

Description:
  • When converting strings to title case, some joiner words should be preserved in all lower case. The Title Case module handles most appropriately, but not all. These are the words the Title Case module treats as small words.

Source:
See:

When converting strings to title case, some joiner words should be preserved in all lower case. The Title Case module handles most appropriately, but not all. These are the words the Title Case module treats as small words.

Type:
  • Array.<string>

(static, constant) linkTemplates :Object.<string, module:link-template.LinkTemplate>

Description:
  • The collection of named link templates loaded by the Linkifier constructor. All templates strip UTM parameters from the URL, and regularise white space in the text and descriptions.

Source:
See:
Properties:
Name Type Description
html module:link-template.LinkTemplate

The default HTML link template. Uses the link title as a the text and description as the hover-text.

htmlNewTab module:link-template.LinkTemplate

The same as the html template, but with a target="_blank" attribute added.

markdown module:link-template.LinkTemplate

The default Markdown link template. Uses the link title as the text, and ignores the description.

The collection of named link templates loaded by the Linkifier constructor. All templates strip UTM parameters from the URL, and regularise white space in the text and descriptions.

Type:

(static, constant) speciallyCapitalisedWords :Array.<string>

Description:
  • When converting strings to title case, some words need to have their capitalisations corrected. These are the custom capitalisations that will be used by default.

Source:
See:

When converting strings to title case, some words need to have their capitalisations corrected. These are the custom capitalisations that will be used by default.

Type:
  • Array.<string>

Methods

(static) dataTransformer()

Description:
  • The default link transformer. The Linkifier constructor assigns this data transformer to the root DNS name ., ensuring it acts as the fallback when no other domains are matched.

    If the page has exactly one top-level heading, this heading is used as a the link text, otherwise the page title is used.

    The description field is not explicitly set, so will default to the link text.

Source: