@bartificer/linkify 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +135 -35
- package/dist/index.js +1 -1
- package/docs/LinkData.class.mjs.html +28 -53
- package/docs/LinkTemplate.class.mjs.html +29 -33
- package/docs/Linkifier.class.mjs.html +46 -59
- package/docs/PageData.class.mjs.html +54 -69
- package/docs/defaults.mjs.html +22 -2
- package/docs/docdash-overrides.css +9 -3
- package/docs/externals.jsdoc.html +6 -2
- package/docs/global.html +1276 -0
- package/docs/index.html +114 -45
- package/docs/index.js.html +7 -3
- package/docs/mermaid-init.js +21 -0
- package/docs/module-cheerio.html +6 -2
- package/docs/module-defaults.html +100 -5
- package/docs/module-link-data.LinkData.html +81 -212
- package/docs/module-link-data.html +8 -4
- package/docs/module-link-template.LinkTemplate.html +71 -96
- package/docs/module-link-template.html +8 -4
- package/docs/module-linkifier.Linkifier.html +103 -376
- package/docs/module-linkifier.html +6 -2
- package/docs/module-linkify.html +7 -3
- package/docs/module-mustache.html +6 -2
- package/docs/module-node-fetch.html +6 -2
- package/docs/module-page-data.PageData.html +224 -202
- package/docs/module-page-data.html +8 -4
- package/docs/module-title-case.html +6 -2
- package/docs/module-urijs.html +6 -2
- package/docs/module-url-slug.html +6 -2
- package/docs/module-utilities.html +74 -24
- package/docs/typedefs.jsdoc.html +145 -0
- package/docs/utilities.mjs.html +36 -23
- package/package.json +3 -2
- package/src/LinkData.class.mjs +22 -51
- package/src/LinkTemplate.class.mjs +23 -31
- package/src/Linkifier.class.mjs +40 -57
- package/src/PageData.class.mjs +48 -67
- package/src/defaults.mjs +16 -0
- package/src/index.js +1 -1
- package/src/typedefs.jsdoc +52 -0
- package/src/utilities.mjs +30 -21
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<input type="text" id="nav-search" placeholder="Search" />
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/bartificer/linkify" target="_blank" >On GitHub</a></h2><h2><a href="https://bartificer.net/" target="_blank" >Bartificer Creations</a></h2><h3>Modules</h3><ul><li><a href="module-defaults.html">defaults</a><ul class='members'><li data-type='member'><a href="module-defaults.html#.linkTemplates">linkTemplates</a></li><li data-type='member'><a href="module-defaults.html#.smallWords">smallWords</a></li><li data-type='member'><a href="module-defaults.html#.speciallyCapitalisedWords">speciallyCapitalisedWords</a></li></ul></li><li><a href="module-link-data.html">link-data</a></li><li><a href="module-link-template.html">link-template</a></li><li><a href="module-linkifier.html">linkifier</a></li><li><a href="module-linkify.html">linkify</a><ul class='members'><li data-type='member'><a href="module-linkify.html#.LinkData">LinkData</a></li><li data-type='member'><a href="module-linkify.html#.LinkTemplate">LinkTemplate</a></li><li data-type='member'><a href="module-linkify.html#.Linkifier">Linkifier</a></li><li data-type='member'><a href="module-linkify.html#.PageData">PageData</a></li><li data-type='member'><a href="module-linkify.html#.VERSION">VERSION</a></li><li data-type='member'><a href="module-linkify.html#.default">default</a></li><li data-type='member'><a href="module-linkify.html#.linkify">linkify</a></li></ul></li><li><a href="module-page-data.html">page-data</a></li><li><a href="module-utilities.html">utilities</a><ul class='methods'><li data-type='method'><a href="module-utilities.html#.batchFixCustomWordCases">batchFixCustomWordCases</a></li><li data-type='method'><a href="module-utilities.html#.escapeRegex">escapeRegex</a></li><li data-type='method'><a href="module-utilities.html#.extractSlug">extractSlug</a></li><li data-type='method'><a href="module-utilities.html#.regulariseWhitespace">regulariseWhitespace</a></li><li data-type='method'><a href="module-utilities.html#.stripQueryString">stripQueryString</a></li><li data-type='method'><a href="module-utilities.html#.stripUTMParameters">stripUTMParameters</a></li><li data-type='method'><a href="module-utilities.html#.toTitleCase">toTitleCase</a></li></ul></li></ul><h3>Classes</h3><ul><li><a href="module-link-data.LinkData.html">LinkData</a><ul class='methods'><li data-type='method'><a href="module-link-data.LinkData.html#asPlainObject">asPlainObject</a></li></ul></li><li><a href="module-link-template.LinkTemplate.html">LinkTemplate</a><ul class='methods'><li data-type='method'><a href="module-link-template.LinkTemplate.html#addFilter">addFilter</a></li><li data-type='method'><a href="module-link-template.LinkTemplate.html#filtersFor">filtersFor</a></li></ul></li><li><a href="module-linkifier.Linkifier.html">Linkifier</a><ul class='methods'><li data-type='method'><a href="module-linkifier.Linkifier.html#fetchPageData">fetchPageData</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#generateLink">generateLink</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTemplate">getTemplate</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTemplateNameForDomain">getTemplateNameForDomain</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTransformerForDomain">getTransformerForDomain</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerDefaultTemplateMapping">registerDefaultTemplateMapping</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerTemplate">registerTemplate</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerTransformer">registerTransformer</a></li></ul></li><li><a href="module-page-data.PageData.html">PageData</a><ul class='methods'><li data-type='method'><a href="module-page-data.PageData.html#addSecondaryHeading">addSecondaryHeading</a></li><li data-type='method'><a href="module-page-data.PageData.html#addTopLevelHeading">addTopLevelHeading</a></li><li data-type='method'><a href="module-page-data.PageData.html#asPlainObject">asPlainObject</a></li><li data-type='method'><a href="module-page-data.PageData.html#h1">h1</a></li><li data-type='method'><a href="module-page-data.PageData.html#h2">h2</a></li></ul></li></ul><h3>Externals</h3><ul><li><a href="module-cheerio.html">cheerio</a></li><li><a href="module-mustache.html">mustache</a></li><li><a href="module-node-fetch.html">node-fetch</a></li><li><a href="module-title-case.html">title-case</a></li><li><a href="module-urijs.html">urijs</a></li><li><a href="module-url-slug.html">url-slug</a></li></ul>
|
|
46
|
+
<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/bartificer/linkify" target="_blank" >On GitHub</a></h2><h2><a href="https://bartificer.net/" target="_blank" >Bartificer Creations</a></h2><h3>Modules</h3><ul><li><a href="module-defaults.html">defaults</a><ul class='members'><li data-type='member'><a href="module-defaults.html#.linkTemplates">linkTemplates</a></li><li data-type='member'><a href="module-defaults.html#.smallWords">smallWords</a></li><li data-type='member'><a href="module-defaults.html#.speciallyCapitalisedWords">speciallyCapitalisedWords</a></li></ul><ul class='methods'><li data-type='method'><a href="module-defaults.html#.dataTransformer">dataTransformer</a></li></ul></li><li><a href="module-link-data.html">link-data</a></li><li><a href="module-link-template.html">link-template</a></li><li><a href="module-linkifier.html">linkifier</a></li><li><a href="module-linkify.html">linkify</a><ul class='members'><li data-type='member'><a href="module-linkify.html#.LinkData">LinkData</a></li><li data-type='member'><a href="module-linkify.html#.LinkTemplate">LinkTemplate</a></li><li data-type='member'><a href="module-linkify.html#.Linkifier">Linkifier</a></li><li data-type='member'><a href="module-linkify.html#.PageData">PageData</a></li><li data-type='member'><a href="module-linkify.html#.VERSION">VERSION</a></li><li data-type='member'><a href="module-linkify.html#.default">default</a></li><li data-type='member'><a href="module-linkify.html#.linkify">linkify</a></li></ul></li><li><a href="module-page-data.html">page-data</a></li><li><a href="module-utilities.html">utilities</a><ul class='methods'><li data-type='method'><a href="module-utilities.html#.batchFixCustomWordCases">batchFixCustomWordCases</a></li><li data-type='method'><a href="module-utilities.html#.escapeRegex">escapeRegex</a></li><li data-type='method'><a href="module-utilities.html#.extractSlug">extractSlug</a></li><li data-type='method'><a href="module-utilities.html#.regulariseWhitespace">regulariseWhitespace</a></li><li data-type='method'><a href="module-utilities.html#.stripQueryString">stripQueryString</a></li><li data-type='method'><a href="module-utilities.html#.stripUTMParameters">stripUTMParameters</a></li><li data-type='method'><a href="module-utilities.html#.toTitleCase">toTitleCase</a></li></ul></li></ul><h3>Classes</h3><ul><li><a href="module-link-data.LinkData.html">LinkData</a><ul class='methods'><li data-type='method'><a href="module-link-data.LinkData.html#asPlainObject">asPlainObject</a></li></ul></li><li><a href="module-link-template.LinkTemplate.html">LinkTemplate</a><ul class='methods'><li data-type='method'><a href="module-link-template.LinkTemplate.html#addFilter">addFilter</a></li><li data-type='method'><a href="module-link-template.LinkTemplate.html#filtersFor">filtersFor</a></li></ul></li><li><a href="module-linkifier.Linkifier.html">Linkifier</a><ul class='methods'><li data-type='method'><a href="module-linkifier.Linkifier.html#fetchPageData">fetchPageData</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#generateLink">generateLink</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTemplate">getTemplate</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTemplateNameForDomain">getTemplateNameForDomain</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTransformerForDomain">getTransformerForDomain</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerDefaultTemplateMapping">registerDefaultTemplateMapping</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerTemplate">registerTemplate</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerTransformer">registerTransformer</a></li></ul></li><li><a href="module-page-data.PageData.html">PageData</a><ul class='methods'><li data-type='method'><a href="module-page-data.PageData.html#addSecondaryHeading">addSecondaryHeading</a></li><li data-type='method'><a href="module-page-data.PageData.html#addTopLevelHeading">addTopLevelHeading</a></li><li data-type='method'><a href="module-page-data.PageData.html#asPlainObject">asPlainObject</a></li><li data-type='method'><a href="module-page-data.PageData.html#h1">h1</a></li><li data-type='method'><a href="module-page-data.PageData.html#h2">h2</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#dataTransformer">dataTransformer</a></li><li><a href="global.html#plainLinkInformationObject">plainLinkInformationObject</a></li><li><a href="global.html#plainPageInformationObject">plainPageInformationObject</a></li><li><a href="global.html#templateFieldFilterFunction">templateFieldFilterFunction</a></li><li><a href="global.html#templateFieldFilterTuple">templateFieldFilterTuple</a></li></ul><h3>Externals</h3><ul><li><a href="module-cheerio.html">cheerio</a></li><li><a href="module-mustache.html">mustache</a></li><li><a href="module-node-fetch.html">node-fetch</a></li><li><a href="module-title-case.html">title-case</a></li><li><a href="module-urijs.html">urijs</a></li><li><a href="module-url-slug.html">url-slug</a></li></ul>
|
|
47
47
|
|
|
48
48
|
</nav>
|
|
49
49
|
|
|
@@ -69,7 +69,8 @@
|
|
|
69
69
|
|
|
70
70
|
</h2>
|
|
71
71
|
|
|
72
|
-
<div class="class-description usertext"><p>
|
|
72
|
+
<div class="class-description usertext"><p>The information that can be used to render a link.</p>
|
|
73
|
+
<p>Instances of this class are created from the information extracted from web pages by data transformers.</p></div>
|
|
73
74
|
|
|
74
75
|
|
|
75
76
|
</header>
|
|
@@ -93,14 +94,11 @@
|
|
|
93
94
|
|
|
94
95
|
<dl class="details">
|
|
95
96
|
|
|
96
|
-
<dt class="tag-description">Description:</dt>
|
|
97
|
-
<dd class="tag-description"><ul class="dummy"><li><p>This constructor throws a ValidationError unless a valid URL is passed.</p></li></ul></dd>
|
|
98
|
-
|
|
99
97
|
|
|
100
98
|
|
|
101
99
|
<dt class="tag-source">Source:</dt>
|
|
102
100
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
103
|
-
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#
|
|
101
|
+
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#line20">line 20</a>
|
|
104
102
|
</li></ul></dd>
|
|
105
103
|
|
|
106
104
|
|
|
@@ -130,6 +128,13 @@
|
|
|
130
128
|
|
|
131
129
|
|
|
132
130
|
|
|
131
|
+
|
|
132
|
+
<dt class="tag-see">See:</dt>
|
|
133
|
+
<dd class="tag-see">
|
|
134
|
+
<ul>
|
|
135
|
+
<li><a href="global.html#dataTransformer">dataTransformer</a> for details of how instances of this class are created.</li>
|
|
136
|
+
</ul>
|
|
137
|
+
</dd>
|
|
133
138
|
|
|
134
139
|
|
|
135
140
|
|
|
@@ -180,7 +185,7 @@
|
|
|
180
185
|
<td class="type">
|
|
181
186
|
|
|
182
187
|
|
|
183
|
-
<span class="param-type">
|
|
188
|
+
<span class="param-type">string</span>
|
|
184
189
|
|
|
185
190
|
|
|
186
191
|
|
|
@@ -267,8 +272,7 @@
|
|
|
267
272
|
|
|
268
273
|
|
|
269
274
|
|
|
270
|
-
<td class="description last"><p>A description for the link, defaults to
|
|
271
|
-
the link text.</p></td>
|
|
275
|
+
<td class="description last"><p>A description for the link, defaults to the link text.</p></td>
|
|
272
276
|
</tr>
|
|
273
277
|
|
|
274
278
|
|
|
@@ -295,8 +299,7 @@ the link text.</p></td>
|
|
|
295
299
|
<dl>
|
|
296
300
|
<dt>
|
|
297
301
|
<div class="param-desc usertext">
|
|
298
|
-
<p>A
|
|
299
|
-
is passed.</p>
|
|
302
|
+
<p>A TypeError is thrown if an invalid URL is passed.</p>
|
|
300
303
|
</div>
|
|
301
304
|
</dt>
|
|
302
305
|
<dd></dd>
|
|
@@ -307,7 +310,7 @@ is passed.</p>
|
|
|
307
310
|
</dt>
|
|
308
311
|
<dd>
|
|
309
312
|
|
|
310
|
-
<span class="param-type">
|
|
313
|
+
<span class="param-type">TypeError</span>
|
|
311
314
|
|
|
312
315
|
|
|
313
316
|
|
|
@@ -345,7 +348,7 @@ is passed.</p>
|
|
|
345
348
|
|
|
346
349
|
|
|
347
350
|
|
|
348
|
-
<h4 class="name" id="description"><span class="type-signature"></span>description<span class="type-signature"
|
|
351
|
+
<h4 class="name" id="description"><span class="type-signature"></span>description<span class="type-signature"> :string</span></h4>
|
|
349
352
|
|
|
350
353
|
|
|
351
354
|
|
|
@@ -353,11 +356,14 @@ is passed.</p>
|
|
|
353
356
|
|
|
354
357
|
<dl class="details">
|
|
355
358
|
|
|
359
|
+
<dt class="tag-description">Description:</dt>
|
|
360
|
+
<dd class="tag-description"><ul class="dummy"><li><p>The link description.</p></li></ul></dd>
|
|
361
|
+
|
|
356
362
|
|
|
357
363
|
|
|
358
364
|
<dt class="tag-source">Source:</dt>
|
|
359
365
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
360
|
-
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#
|
|
366
|
+
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#line99">line 99</a>
|
|
361
367
|
</li></ul></dd>
|
|
362
368
|
|
|
363
369
|
|
|
@@ -396,67 +402,22 @@ is passed.</p>
|
|
|
396
402
|
|
|
397
403
|
|
|
398
404
|
|
|
405
|
+
<div class="description usertext">
|
|
406
|
+
<p>The link description.</p>
|
|
407
|
+
</div>
|
|
399
408
|
|
|
400
409
|
|
|
401
410
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
411
|
+
<h5 class="h5-types">Type:</h5>
|
|
412
|
+
<ul>
|
|
413
|
+
<li>
|
|
407
414
|
|
|
408
|
-
<
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
<dl class="details">
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
<dt class="tag-source">Source:</dt>
|
|
419
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
420
|
-
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#line114">line 114</a>
|
|
421
|
-
</li></ul></dd>
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
</dl>
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
415
|
+
<span class="param-type">string</span>
|
|
457
416
|
|
|
458
417
|
|
|
459
418
|
|
|
419
|
+
</li>
|
|
420
|
+
</ul>
|
|
460
421
|
|
|
461
422
|
|
|
462
423
|
|
|
@@ -465,7 +426,7 @@ is passed.</p>
|
|
|
465
426
|
|
|
466
427
|
|
|
467
428
|
|
|
468
|
-
<h4 class="name" id="text"><span class="type-signature"></span>text<span class="type-signature"
|
|
429
|
+
<h4 class="name" id="text"><span class="type-signature"></span>text<span class="type-signature"> :string</span></h4>
|
|
469
430
|
|
|
470
431
|
|
|
471
432
|
|
|
@@ -473,11 +434,14 @@ is passed.</p>
|
|
|
473
434
|
|
|
474
435
|
<dl class="details">
|
|
475
436
|
|
|
437
|
+
<dt class="tag-description">Description:</dt>
|
|
438
|
+
<dd class="tag-description"><ul class="dummy"><li><p>The link text.</p></li></ul></dd>
|
|
439
|
+
|
|
476
440
|
|
|
477
441
|
|
|
478
442
|
<dt class="tag-source">Source:</dt>
|
|
479
443
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
480
|
-
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#
|
|
444
|
+
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#line88">line 88</a>
|
|
481
445
|
</li></ul></dd>
|
|
482
446
|
|
|
483
447
|
|
|
@@ -516,67 +480,22 @@ is passed.</p>
|
|
|
516
480
|
|
|
517
481
|
|
|
518
482
|
|
|
483
|
+
<div class="description usertext">
|
|
484
|
+
<p>The link text.</p>
|
|
485
|
+
</div>
|
|
519
486
|
|
|
520
487
|
|
|
521
488
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
489
|
+
<h5 class="h5-types">Type:</h5>
|
|
490
|
+
<ul>
|
|
491
|
+
<li>
|
|
527
492
|
|
|
528
|
-
<
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
<dl class="details">
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
<dt class="tag-source">Source:</dt>
|
|
539
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
540
|
-
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#line100">line 100</a>
|
|
541
|
-
</li></ul></dd>
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
</dl>
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
493
|
+
<span class="param-type">string</span>
|
|
577
494
|
|
|
578
495
|
|
|
579
496
|
|
|
497
|
+
</li>
|
|
498
|
+
</ul>
|
|
580
499
|
|
|
581
500
|
|
|
582
501
|
|
|
@@ -585,7 +504,7 @@ is passed.</p>
|
|
|
585
504
|
|
|
586
505
|
|
|
587
506
|
|
|
588
|
-
<h4 class="name" id="uri"><span class="type-signature"
|
|
507
|
+
<h4 class="name" id="uri"><span class="type-signature type-signature-readonly">(readonly) </span>uri<span class="type-signature"> :<a href="module-urijs.html">module:urijs</a></span></h4>
|
|
589
508
|
|
|
590
509
|
|
|
591
510
|
|
|
@@ -594,13 +513,13 @@ is passed.</p>
|
|
|
594
513
|
<dl class="details">
|
|
595
514
|
|
|
596
515
|
<dt class="tag-description">Description:</dt>
|
|
597
|
-
<dd class="tag-description"><ul class="dummy"><li><p>
|
|
516
|
+
<dd class="tag-description"><ul class="dummy"><li><p>The URL the link points to as a URI.js object representing the URL.</p></li></ul></dd>
|
|
598
517
|
|
|
599
518
|
|
|
600
519
|
|
|
601
520
|
<dt class="tag-source">Source:</dt>
|
|
602
521
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
603
|
-
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#
|
|
522
|
+
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#line80">line 80</a>
|
|
604
523
|
</li></ul></dd>
|
|
605
524
|
|
|
606
525
|
|
|
@@ -640,70 +559,21 @@ is passed.</p>
|
|
|
640
559
|
|
|
641
560
|
|
|
642
561
|
<div class="description usertext">
|
|
643
|
-
<p>
|
|
562
|
+
<p>The URL the link points to as a URI.js object representing the URL.</p>
|
|
644
563
|
</div>
|
|
645
564
|
|
|
646
565
|
|
|
647
566
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
567
|
+
<h5 class="h5-types">Type:</h5>
|
|
568
|
+
<ul>
|
|
569
|
+
<li>
|
|
654
570
|
|
|
655
|
-
<
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
<dl class="details">
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
<dt class="tag-source">Source:</dt>
|
|
666
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
667
|
-
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#line68">line 68</a>
|
|
668
|
-
</li></ul></dd>
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
</dl>
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
571
|
+
<span class="param-type"><a href="module-urijs.html">module:urijs</a></span>
|
|
704
572
|
|
|
705
573
|
|
|
706
574
|
|
|
575
|
+
</li>
|
|
576
|
+
</ul>
|
|
707
577
|
|
|
708
578
|
|
|
709
579
|
|
|
@@ -712,7 +582,7 @@ is passed.</p>
|
|
|
712
582
|
|
|
713
583
|
|
|
714
584
|
|
|
715
|
-
<h4 class="name" id="url"><span class="type-signature"></span>url<span class="type-signature"
|
|
585
|
+
<h4 class="name" id="url"><span class="type-signature"></span>url<span class="type-signature"> :string</span></h4>
|
|
716
586
|
|
|
717
587
|
|
|
718
588
|
|
|
@@ -721,13 +591,13 @@ is passed.</p>
|
|
|
721
591
|
<dl class="details">
|
|
722
592
|
|
|
723
593
|
<dt class="tag-description">Description:</dt>
|
|
724
|
-
<dd class="tag-description"><ul class="dummy"><li><p>
|
|
594
|
+
<dd class="tag-description"><ul class="dummy"><li><p>The URL the link points to as a string.</p></li></ul></dd>
|
|
725
595
|
|
|
726
596
|
|
|
727
597
|
|
|
728
598
|
<dt class="tag-source">Source:</dt>
|
|
729
599
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
730
|
-
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#
|
|
600
|
+
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#line68">line 68</a>
|
|
731
601
|
</li></ul></dd>
|
|
732
602
|
|
|
733
603
|
|
|
@@ -767,11 +637,22 @@ is passed.</p>
|
|
|
767
637
|
|
|
768
638
|
|
|
769
639
|
<div class="description usertext">
|
|
770
|
-
<p>
|
|
640
|
+
<p>The URL the link points to as a string.</p>
|
|
771
641
|
</div>
|
|
772
642
|
|
|
773
643
|
|
|
774
644
|
|
|
645
|
+
<h5 class="h5-types">Type:</h5>
|
|
646
|
+
<ul>
|
|
647
|
+
<li>
|
|
648
|
+
|
|
649
|
+
<span class="param-type">string</span>
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
</li>
|
|
654
|
+
</ul>
|
|
655
|
+
|
|
775
656
|
|
|
776
657
|
|
|
777
658
|
|
|
@@ -788,7 +669,7 @@ is passed.</p>
|
|
|
788
669
|
|
|
789
670
|
|
|
790
671
|
|
|
791
|
-
<h4 class="name" id="asPlainObject"><span class="type-signature"></span>asPlainObject<span class="signature">()</span><span class="type-signature"> → {
|
|
672
|
+
<h4 class="name" id="asPlainObject"><span class="type-signature"></span>asPlainObject<span class="signature">()</span><span class="type-signature"> → {<a href="global.html#plainLinkInformationObject">plainLinkInformationObject</a>}</span></h4>
|
|
792
673
|
|
|
793
674
|
|
|
794
675
|
|
|
@@ -798,26 +679,13 @@ is passed.</p>
|
|
|
798
679
|
<dl class="details">
|
|
799
680
|
|
|
800
681
|
<dt class="tag-description">Description:</dt>
|
|
801
|
-
<dd class="tag-description"><ul class="dummy"><li><p>
|
|
802
|
-
<pre class="prettyprint source"><code>{
|
|
803
|
-
url: 'http://www.bartificer.net/',
|
|
804
|
-
text: 'the link text',
|
|
805
|
-
description: 'the link description',
|
|
806
|
-
uri: {
|
|
807
|
-
hostname: 'www.bartificer.net',
|
|
808
|
-
path: '/',
|
|
809
|
-
hasPath: false
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
</code></pre>
|
|
813
|
-
<p>Note that the <code>uri</code> could contain more fields - it's initialised with
|
|
814
|
-
output from the <code>URI.parse()</code> function from the <code>URI</code> module.</p></li></ul></dd>
|
|
682
|
+
<dd class="tag-description"><ul class="dummy"><li><p>The link data as a plain object for use in Mustache templates and the like.</p></li></ul></dd>
|
|
815
683
|
|
|
816
684
|
|
|
817
685
|
|
|
818
686
|
<dt class="tag-source">Source:</dt>
|
|
819
687
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
820
|
-
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#
|
|
688
|
+
<a href="LinkData.class.mjs.html">LinkData.class.mjs</a>, <a href="LinkData.class.mjs.html#line110">line 110</a>
|
|
821
689
|
</li></ul></dd>
|
|
822
690
|
|
|
823
691
|
|
|
@@ -847,13 +715,6 @@ output from the <code>URI.parse()</code> function from the <code>URI</code> modu
|
|
|
847
715
|
|
|
848
716
|
|
|
849
717
|
|
|
850
|
-
|
|
851
|
-
<dt class="tag-see">See:</dt>
|
|
852
|
-
<dd class="tag-see">
|
|
853
|
-
<ul>
|
|
854
|
-
<li><a href="https://medialize.github.io/URI.js/docs.html#static-parse">https://medialize.github.io/URI.js/docs.html#static-parse</a></li>
|
|
855
|
-
</ul>
|
|
856
|
-
</dd>
|
|
857
718
|
|
|
858
719
|
|
|
859
720
|
|
|
@@ -888,6 +749,10 @@ output from the <code>URI.parse()</code> function from the <code>URI</code> modu
|
|
|
888
749
|
<h5 class="h5-returns">Returns:</h5>
|
|
889
750
|
|
|
890
751
|
|
|
752
|
+
<div class="param-desc">
|
|
753
|
+
<p>A plain object containing the link data.</p>
|
|
754
|
+
</div>
|
|
755
|
+
|
|
891
756
|
|
|
892
757
|
|
|
893
758
|
<dl class="param-type">
|
|
@@ -896,7 +761,7 @@ output from the <code>URI.parse()</code> function from the <code>URI</code> modu
|
|
|
896
761
|
</dt>
|
|
897
762
|
<dd>
|
|
898
763
|
|
|
899
|
-
<span class="param-type">
|
|
764
|
+
<span class="param-type"><a href="global.html#plainLinkInformationObject">plainLinkInformationObject</a></span>
|
|
900
765
|
|
|
901
766
|
|
|
902
767
|
|
|
@@ -927,7 +792,7 @@ output from the <code>URI.parse()</code> function from the <code>URI</code> modu
|
|
|
927
792
|
<br class="clear">
|
|
928
793
|
|
|
929
794
|
<footer>
|
|
930
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on
|
|
795
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Wed Apr 15 2026 17:49:51 GMT+0100 (Irish Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
931
796
|
</footer>
|
|
932
797
|
|
|
933
798
|
<script>prettyPrint();</script>
|
|
@@ -940,5 +805,9 @@ output from the <code>URI.parse()</code> function from the <code>URI</code> modu
|
|
|
940
805
|
|
|
941
806
|
<link type="text/css" rel="stylesheet" href="./docdash-overrides.css">
|
|
942
807
|
|
|
808
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
|
809
|
+
|
|
810
|
+
<script src="./mermaid-init.js"></script>
|
|
811
|
+
|
|
943
812
|
</body>
|
|
944
813
|
</html>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<input type="text" id="nav-search" placeholder="Search" />
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/bartificer/linkify" target="_blank" >On GitHub</a></h2><h2><a href="https://bartificer.net/" target="_blank" >Bartificer Creations</a></h2><h3>Modules</h3><ul><li><a href="module-defaults.html">defaults</a><ul class='members'><li data-type='member'><a href="module-defaults.html#.linkTemplates">linkTemplates</a></li><li data-type='member'><a href="module-defaults.html#.smallWords">smallWords</a></li><li data-type='member'><a href="module-defaults.html#.speciallyCapitalisedWords">speciallyCapitalisedWords</a></li></ul></li><li><a href="module-link-data.html">link-data</a></li><li><a href="module-link-template.html">link-template</a></li><li><a href="module-linkifier.html">linkifier</a></li><li><a href="module-linkify.html">linkify</a><ul class='members'><li data-type='member'><a href="module-linkify.html#.LinkData">LinkData</a></li><li data-type='member'><a href="module-linkify.html#.LinkTemplate">LinkTemplate</a></li><li data-type='member'><a href="module-linkify.html#.Linkifier">Linkifier</a></li><li data-type='member'><a href="module-linkify.html#.PageData">PageData</a></li><li data-type='member'><a href="module-linkify.html#.VERSION">VERSION</a></li><li data-type='member'><a href="module-linkify.html#.default">default</a></li><li data-type='member'><a href="module-linkify.html#.linkify">linkify</a></li></ul></li><li><a href="module-page-data.html">page-data</a></li><li><a href="module-utilities.html">utilities</a><ul class='methods'><li data-type='method'><a href="module-utilities.html#.batchFixCustomWordCases">batchFixCustomWordCases</a></li><li data-type='method'><a href="module-utilities.html#.escapeRegex">escapeRegex</a></li><li data-type='method'><a href="module-utilities.html#.extractSlug">extractSlug</a></li><li data-type='method'><a href="module-utilities.html#.regulariseWhitespace">regulariseWhitespace</a></li><li data-type='method'><a href="module-utilities.html#.stripQueryString">stripQueryString</a></li><li data-type='method'><a href="module-utilities.html#.stripUTMParameters">stripUTMParameters</a></li><li data-type='method'><a href="module-utilities.html#.toTitleCase">toTitleCase</a></li></ul></li></ul><h3>Classes</h3><ul><li><a href="module-link-data.LinkData.html">LinkData</a><ul class='methods'><li data-type='method'><a href="module-link-data.LinkData.html#asPlainObject">asPlainObject</a></li></ul></li><li><a href="module-link-template.LinkTemplate.html">LinkTemplate</a><ul class='methods'><li data-type='method'><a href="module-link-template.LinkTemplate.html#addFilter">addFilter</a></li><li data-type='method'><a href="module-link-template.LinkTemplate.html#filtersFor">filtersFor</a></li></ul></li><li><a href="module-linkifier.Linkifier.html">Linkifier</a><ul class='methods'><li data-type='method'><a href="module-linkifier.Linkifier.html#fetchPageData">fetchPageData</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#generateLink">generateLink</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTemplate">getTemplate</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTemplateNameForDomain">getTemplateNameForDomain</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTransformerForDomain">getTransformerForDomain</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerDefaultTemplateMapping">registerDefaultTemplateMapping</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerTemplate">registerTemplate</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerTransformer">registerTransformer</a></li></ul></li><li><a href="module-page-data.PageData.html">PageData</a><ul class='methods'><li data-type='method'><a href="module-page-data.PageData.html#addSecondaryHeading">addSecondaryHeading</a></li><li data-type='method'><a href="module-page-data.PageData.html#addTopLevelHeading">addTopLevelHeading</a></li><li data-type='method'><a href="module-page-data.PageData.html#asPlainObject">asPlainObject</a></li><li data-type='method'><a href="module-page-data.PageData.html#h1">h1</a></li><li data-type='method'><a href="module-page-data.PageData.html#h2">h2</a></li></ul></li></ul><h3>Externals</h3><ul><li><a href="module-cheerio.html">cheerio</a></li><li><a href="module-mustache.html">mustache</a></li><li><a href="module-node-fetch.html">node-fetch</a></li><li><a href="module-title-case.html">title-case</a></li><li><a href="module-urijs.html">urijs</a></li><li><a href="module-url-slug.html">url-slug</a></li></ul>
|
|
46
|
+
<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/bartificer/linkify" target="_blank" >On GitHub</a></h2><h2><a href="https://bartificer.net/" target="_blank" >Bartificer Creations</a></h2><h3>Modules</h3><ul><li><a href="module-defaults.html">defaults</a><ul class='members'><li data-type='member'><a href="module-defaults.html#.linkTemplates">linkTemplates</a></li><li data-type='member'><a href="module-defaults.html#.smallWords">smallWords</a></li><li data-type='member'><a href="module-defaults.html#.speciallyCapitalisedWords">speciallyCapitalisedWords</a></li></ul><ul class='methods'><li data-type='method'><a href="module-defaults.html#.dataTransformer">dataTransformer</a></li></ul></li><li><a href="module-link-data.html">link-data</a></li><li><a href="module-link-template.html">link-template</a></li><li><a href="module-linkifier.html">linkifier</a></li><li><a href="module-linkify.html">linkify</a><ul class='members'><li data-type='member'><a href="module-linkify.html#.LinkData">LinkData</a></li><li data-type='member'><a href="module-linkify.html#.LinkTemplate">LinkTemplate</a></li><li data-type='member'><a href="module-linkify.html#.Linkifier">Linkifier</a></li><li data-type='member'><a href="module-linkify.html#.PageData">PageData</a></li><li data-type='member'><a href="module-linkify.html#.VERSION">VERSION</a></li><li data-type='member'><a href="module-linkify.html#.default">default</a></li><li data-type='member'><a href="module-linkify.html#.linkify">linkify</a></li></ul></li><li><a href="module-page-data.html">page-data</a></li><li><a href="module-utilities.html">utilities</a><ul class='methods'><li data-type='method'><a href="module-utilities.html#.batchFixCustomWordCases">batchFixCustomWordCases</a></li><li data-type='method'><a href="module-utilities.html#.escapeRegex">escapeRegex</a></li><li data-type='method'><a href="module-utilities.html#.extractSlug">extractSlug</a></li><li data-type='method'><a href="module-utilities.html#.regulariseWhitespace">regulariseWhitespace</a></li><li data-type='method'><a href="module-utilities.html#.stripQueryString">stripQueryString</a></li><li data-type='method'><a href="module-utilities.html#.stripUTMParameters">stripUTMParameters</a></li><li data-type='method'><a href="module-utilities.html#.toTitleCase">toTitleCase</a></li></ul></li></ul><h3>Classes</h3><ul><li><a href="module-link-data.LinkData.html">LinkData</a><ul class='methods'><li data-type='method'><a href="module-link-data.LinkData.html#asPlainObject">asPlainObject</a></li></ul></li><li><a href="module-link-template.LinkTemplate.html">LinkTemplate</a><ul class='methods'><li data-type='method'><a href="module-link-template.LinkTemplate.html#addFilter">addFilter</a></li><li data-type='method'><a href="module-link-template.LinkTemplate.html#filtersFor">filtersFor</a></li></ul></li><li><a href="module-linkifier.Linkifier.html">Linkifier</a><ul class='methods'><li data-type='method'><a href="module-linkifier.Linkifier.html#fetchPageData">fetchPageData</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#generateLink">generateLink</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTemplate">getTemplate</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTemplateNameForDomain">getTemplateNameForDomain</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#getTransformerForDomain">getTransformerForDomain</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerDefaultTemplateMapping">registerDefaultTemplateMapping</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerTemplate">registerTemplate</a></li><li data-type='method'><a href="module-linkifier.Linkifier.html#registerTransformer">registerTransformer</a></li></ul></li><li><a href="module-page-data.PageData.html">PageData</a><ul class='methods'><li data-type='method'><a href="module-page-data.PageData.html#addSecondaryHeading">addSecondaryHeading</a></li><li data-type='method'><a href="module-page-data.PageData.html#addTopLevelHeading">addTopLevelHeading</a></li><li data-type='method'><a href="module-page-data.PageData.html#asPlainObject">asPlainObject</a></li><li data-type='method'><a href="module-page-data.PageData.html#h1">h1</a></li><li data-type='method'><a href="module-page-data.PageData.html#h2">h2</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#dataTransformer">dataTransformer</a></li><li><a href="global.html#plainLinkInformationObject">plainLinkInformationObject</a></li><li><a href="global.html#plainPageInformationObject">plainPageInformationObject</a></li><li><a href="global.html#templateFieldFilterFunction">templateFieldFilterFunction</a></li><li><a href="global.html#templateFieldFilterTuple">templateFieldFilterTuple</a></li></ul><h3>Externals</h3><ul><li><a href="module-cheerio.html">cheerio</a></li><li><a href="module-mustache.html">mustache</a></li><li><a href="module-node-fetch.html">node-fetch</a></li><li><a href="module-title-case.html">title-case</a></li><li><a href="module-urijs.html">urijs</a></li><li><a href="module-url-slug.html">url-slug</a></li></ul>
|
|
47
47
|
|
|
48
48
|
</nav>
|
|
49
49
|
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<div class="container-overview">
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
<div class="description usertext"><p>This module provides
|
|
75
|
+
<div class="description usertext"><p>This module provides the class for representing the information that can be used to render a link.</p></div>
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
<dl class="details">
|
|
85
85
|
|
|
86
86
|
<dt class="tag-description">Description:</dt>
|
|
87
|
-
<dd class="tag-description"><ul class="dummy"><li><p>This module provides
|
|
87
|
+
<dd class="tag-description"><ul class="dummy"><li><p>This module provides the class for representing the information that can be used to render a link.</p></li></ul></dd>
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
<br class="clear">
|
|
206
206
|
|
|
207
207
|
<footer>
|
|
208
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on
|
|
208
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Wed Apr 15 2026 17:49:51 GMT+0100 (Irish Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
209
209
|
</footer>
|
|
210
210
|
|
|
211
211
|
<script>prettyPrint();</script>
|
|
@@ -218,5 +218,9 @@
|
|
|
218
218
|
|
|
219
219
|
<link type="text/css" rel="stylesheet" href="./docdash-overrides.css">
|
|
220
220
|
|
|
221
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
|
222
|
+
|
|
223
|
+
<script src="./mermaid-init.js"></script>
|
|
224
|
+
|
|
221
225
|
</body>
|
|
222
226
|
</html>
|