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:
-
- module:linkifier-class.Linkifier.importConfig for details of how this default file name is used.
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:
-
- module:utilities.toTitleCase for the function that uses this list to treat these words as small words by default.
- module:title-case for the Title Case module who's default small word list is augmented by this list.
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:
-
- module:utilities.toTitleCase for the function that uses this list to treat these words as small words by default.
- module:title-case for the Title Case module who's default small word list is augmented by this list.
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:
-
- module:utilities.stripUTMParameters for the function used to strip UTM parameters from the URL.
- module:utilities.regulariseWhitespace for the function used to regularise white space in the text and description.
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 |
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:
- Object.<string, module:link-template.LinkTemplate>
(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:
-
- module:utilities.toTitleCase for the function that uses this list to correct capitalisations by default.
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: