@bartificer/linkify 2.3.5 → 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.
Files changed (102) hide show
  1. package/README.md +135 -35
  2. package/dist/index.js +1 -1
  3. package/docs/LinkData.class.mjs.html +119 -56
  4. package/docs/LinkTemplate.class.mjs.html +120 -36
  5. package/docs/Linkifier.class.mjs.html +141 -66
  6. package/docs/PageData.class.mjs.html +145 -72
  7. package/docs/defaults.mjs.html +136 -12
  8. package/docs/docdash-overrides.css +11 -0
  9. package/docs/externals.jsdoc.html +95 -4
  10. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  12. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  14. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  15. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  16. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  17. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  24. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  25. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  26. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  27. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  28. package/docs/global.html +1276 -0
  29. package/docs/index.html +1018 -26
  30. package/docs/index.js.html +143 -17
  31. package/docs/mermaid-init.js +21 -0
  32. package/docs/module-cheerio.html +193 -3
  33. package/docs/module-defaults.html +680 -3
  34. package/docs/module-link-data.LinkData.html +813 -0
  35. package/docs/module-link-data.html +226 -0
  36. package/docs/module-link-template.LinkTemplate.html +792 -0
  37. package/docs/module-link-template.html +226 -0
  38. package/docs/module-linkifier.Linkifier.html +2050 -0
  39. package/docs/module-linkifier.html +236 -0
  40. package/docs/module-linkify.html +810 -3
  41. package/docs/module-mustache.html +193 -3
  42. package/docs/module-node-fetch.html +193 -3
  43. package/docs/module-page-data.PageData.html +1810 -0
  44. package/docs/module-page-data.html +226 -0
  45. package/docs/module-title-case.html +193 -3
  46. package/docs/module-urijs.html +193 -3
  47. package/docs/module-url-slug.html +193 -3
  48. package/docs/module-utilities.html +1518 -3
  49. package/docs/scripts/collapse.js +39 -0
  50. package/docs/scripts/commonNav.js +28 -0
  51. package/docs/scripts/linenumber.js +25 -0
  52. package/docs/scripts/nav.js +12 -0
  53. package/docs/scripts/polyfill.js +4 -0
  54. package/docs/scripts/{third-party → prettify}/Apache-License-2.0.txt +202 -202
  55. package/docs/scripts/prettify/lang-css.js +2 -0
  56. package/docs/scripts/prettify/prettify.js +28 -0
  57. package/docs/scripts/search.js +99 -265
  58. package/docs/styles/jsdoc.css +776 -0
  59. package/docs/styles/prettify.css +80 -0
  60. package/docs/typedefs.jsdoc.html +145 -0
  61. package/docs/utilities.mjs.html +154 -22
  62. package/examples/clipboardURLToMarkdown.mjs +80 -1
  63. package/package.json +5 -3
  64. package/src/LinkData.class.mjs +24 -52
  65. package/src/LinkTemplate.class.mjs +25 -32
  66. package/src/Linkifier.class.mjs +46 -62
  67. package/src/PageData.class.mjs +50 -68
  68. package/src/defaults.mjs +42 -8
  69. package/src/index.js +48 -13
  70. package/src/typedefs.jsdoc +52 -0
  71. package/src/utilities.mjs +59 -18
  72. package/docs/data/search.json +0 -1
  73. package/docs/fonts/Inconsolata-Regular.ttf +0 -0
  74. package/docs/fonts/OpenSans-Regular.ttf +0 -0
  75. package/docs/fonts/WorkSans-Bold.ttf +0 -0
  76. package/docs/module-LinkData.LinkData.html +0 -13
  77. package/docs/module-LinkData.html +0 -3
  78. package/docs/module-LinkTemplate.LinkTemplate.html +0 -3
  79. package/docs/module-LinkTemplate.html +0 -3
  80. package/docs/module-Linkifier.Linkifier.html +0 -3
  81. package/docs/module-Linkifier.html +0 -3
  82. package/docs/module-PageData.PageData.html +0 -15
  83. package/docs/module-PageData.html +0 -3
  84. package/docs/scripts/core.js +0 -726
  85. package/docs/scripts/core.min.js +0 -23
  86. package/docs/scripts/resize.js +0 -90
  87. package/docs/scripts/search.min.js +0 -6
  88. package/docs/scripts/third-party/fuse.js +0 -9
  89. package/docs/scripts/third-party/hljs-line-num-original.js +0 -369
  90. package/docs/scripts/third-party/hljs-line-num.js +0 -1
  91. package/docs/scripts/third-party/hljs-original.js +0 -5171
  92. package/docs/scripts/third-party/hljs.js +0 -1
  93. package/docs/scripts/third-party/popper.js +0 -5
  94. package/docs/scripts/third-party/tippy.js +0 -1
  95. package/docs/scripts/third-party/tocbot.js +0 -672
  96. package/docs/scripts/third-party/tocbot.min.js +0 -1
  97. package/docs/styles/clean-jsdoc-theme-base.css +0 -1159
  98. package/docs/styles/clean-jsdoc-theme-dark.css +0 -412
  99. package/docs/styles/clean-jsdoc-theme-light.css +0 -482
  100. package/docs/styles/clean-jsdoc-theme-scrollbar.css +0 -30
  101. package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +0 -1
  102. package/docs/styles/clean-jsdoc-theme.min.css +0 -1
@@ -0,0 +1,1276 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>Global - @bartificer/linkify Documentation</title>
7
+
8
+ <meta name="description" content="Documentation for the @bartificer/linkify package" />
9
+
10
+ <meta name="keywords" content="documentation, linkify, link, template, javascript, generator, npm, module, package" />
11
+ <meta name="keyword" content="documentation, linkify, link, template, javascript, generator, npm, module, package" />
12
+
13
+
14
+
15
+ <meta property="og:title" content="@bartificer/linkify"/>
16
+ <meta property="og:type" content="website"/>
17
+ <meta property="og:image" content=""/>
18
+ <meta property="og:site_name" content="@bartificer/linkify Documentation"/>
19
+ <meta property="og:url" content="https://bartificer.github.io/linkify/"/>
20
+
21
+ <script src="scripts/prettify/prettify.js"></script>
22
+ <script src="scripts/prettify/lang-css.js"></script>
23
+ <!--[if lt IE 9]>
24
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
25
+ <![endif]-->
26
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
27
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
28
+ <script src="scripts/nav.js" defer></script>
29
+
30
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
31
+ </head>
32
+ <body>
33
+
34
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
35
+ <label for="nav-trigger" class="navicon-button x">
36
+ <div class="navicon"></div>
37
+ </label>
38
+
39
+ <label for="nav-trigger" class="overlay"></label>
40
+
41
+ <nav class="wrap">
42
+
43
+ <input type="text" id="nav-search" placeholder="Search" />
44
+
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><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
+
48
+ </nav>
49
+
50
+ <div id="main">
51
+
52
+ <h1 class="page-title">Global</h1>
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ <section>
61
+
62
+ <header>
63
+
64
+ <h2>
65
+
66
+
67
+
68
+ </h2>
69
+
70
+
71
+ </header>
72
+
73
+ <article>
74
+
75
+ <div class="container-overview">
76
+
77
+
78
+
79
+ <dl class="details">
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ </dl>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ </div>
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ <h3 class="subsection-title">Type Definitions</h3>
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <h4 class="name" id="dataTransformer"><span class="type-signature"></span>dataTransformer<span class="signature">(pData)</span><span class="type-signature"> &rarr; {<a href="module-link-data.LinkData.html">module:link-data.LinkData</a>}</span></h4>
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <dl class="details">
157
+
158
+ <dt class="tag-description">Description:</dt>
159
+ <dd class="tag-description"><ul class="dummy"><li><p>Functions for converting information extracted from a web page into the information used to render links.</p></li></ul></dd>
160
+
161
+
162
+
163
+ <dt class="tag-source">Source:</dt>
164
+ <dd class="tag-source"><ul class="dummy"><li>
165
+ <a href="typedefs.jsdoc.html">typedefs.jsdoc</a>, <a href="typedefs.jsdoc.html#line1">line 1</a>
166
+ </li></ul></dd>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+ </dl>
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+ <h5 class="h5-parameters">Parameters:</h5>
213
+
214
+
215
+ <table class="params">
216
+ <thead>
217
+ <tr>
218
+
219
+ <th>Name</th>
220
+
221
+
222
+ <th>Type</th>
223
+
224
+
225
+
226
+
227
+
228
+ <th class="last">Description</th>
229
+ </tr>
230
+ </thead>
231
+
232
+ <tbody>
233
+
234
+
235
+ <tr>
236
+
237
+ <td class="name"><code>pData</code></td>
238
+
239
+
240
+ <td class="type">
241
+
242
+
243
+ <span class="param-type"><a href="module-page-data.PageData.html">module:page-data.PageData</a></span>
244
+
245
+
246
+
247
+
248
+ </td>
249
+
250
+
251
+
252
+
253
+
254
+ <td class="description last"><p>The web page data to be transrormed to link data.</p></td>
255
+ </tr>
256
+
257
+
258
+ </tbody>
259
+ </table>
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+ <h5 class="h5-returns">Returns:</h5>
277
+
278
+
279
+ <div class="param-desc">
280
+ <p>The link information derived from the page data.</p>
281
+ </div>
282
+
283
+
284
+
285
+ <dl class="param-type">
286
+ <dt>
287
+ Type
288
+ </dt>
289
+ <dd>
290
+
291
+ <span class="param-type"><a href="module-link-data.LinkData.html">module:link-data.LinkData</a></span>
292
+
293
+
294
+
295
+ </dd>
296
+ </dl>
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+ <h4 class="name" id="plainLinkInformationObject">plainLinkInformationObject</h4>
305
+
306
+
307
+
308
+
309
+
310
+ <dl class="details">
311
+
312
+ <dt class="tag-description">Description:</dt>
313
+ <dd class="tag-description"><ul class="dummy"><li><p>A plain object represeting the information about about link that can get utilised in a template.</p>
314
+ <p>Note that the <code>uri</code> could contain more fields - it's initialised with output from the <code>URI.parse()</code> function from the <code>URI</code> module.</p></li></ul></dd>
315
+
316
+
317
+
318
+ <dt class="tag-source">Source:</dt>
319
+ <dd class="tag-source"><ul class="dummy"><li>
320
+ <a href="typedefs.jsdoc.html">typedefs.jsdoc</a>, <a href="typedefs.jsdoc.html#line22">line 22</a>
321
+ </li></ul></dd>
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+ <dt class="tag-see">See:</dt>
352
+ <dd class="tag-see">
353
+ <ul>
354
+ <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>
355
+ </ul>
356
+ </dd>
357
+
358
+
359
+
360
+ </dl>
361
+
362
+
363
+
364
+ <h5 class="subsection-title">Properties:</h5>
365
+
366
+
367
+
368
+ <table class="props">
369
+ <thead>
370
+ <tr>
371
+
372
+ <th>Name</th>
373
+
374
+
375
+ <th>Type</th>
376
+
377
+
378
+
379
+
380
+
381
+ <th class="last">Description</th>
382
+ </tr>
383
+ </thead>
384
+
385
+ <tbody>
386
+
387
+
388
+ <tr>
389
+
390
+ <td class="name"><code>url</code></td>
391
+
392
+
393
+ <td class="type">
394
+
395
+
396
+ <span class="param-type">string</span>
397
+
398
+
399
+
400
+
401
+ </td>
402
+
403
+
404
+
405
+
406
+
407
+ <td class="description last"><p>the URL for the link.</p></td>
408
+ </tr>
409
+
410
+
411
+
412
+ <tr>
413
+
414
+ <td class="name"><code>text</code></td>
415
+
416
+
417
+ <td class="type">
418
+
419
+
420
+ <span class="param-type">string</span>
421
+
422
+
423
+
424
+
425
+ </td>
426
+
427
+
428
+
429
+
430
+
431
+ <td class="description last"><p>the text for the link.</p></td>
432
+ </tr>
433
+
434
+
435
+
436
+ <tr>
437
+
438
+ <td class="name"><code>description</code></td>
439
+
440
+
441
+ <td class="type">
442
+
443
+
444
+ <span class="param-type">string</span>
445
+
446
+
447
+
448
+
449
+ </td>
450
+
451
+
452
+
453
+
454
+
455
+ <td class="description last"><p>a description for the link.</p></td>
456
+ </tr>
457
+
458
+
459
+
460
+ <tr>
461
+
462
+ <td class="name"><code>uri</code></td>
463
+
464
+
465
+ <td class="type">
466
+
467
+
468
+ <span class="param-type">Object</span>
469
+
470
+
471
+
472
+
473
+ </td>
474
+
475
+
476
+
477
+
478
+
479
+ <td class="description last"><p>the URL's components</p></td>
480
+ </tr>
481
+
482
+
483
+
484
+ <tr>
485
+
486
+ <td class="name"><code>url.hostname</code></td>
487
+
488
+
489
+ <td class="type">
490
+
491
+
492
+ <span class="param-type">string</span>
493
+
494
+
495
+
496
+
497
+ </td>
498
+
499
+
500
+
501
+
502
+
503
+ <td class="description last"><p>the hostname part of the URL.</p></td>
504
+ </tr>
505
+
506
+
507
+
508
+ <tr>
509
+
510
+ <td class="name"><code>url.path</code></td>
511
+
512
+
513
+ <td class="type">
514
+
515
+
516
+ <span class="param-type">string</span>
517
+
518
+
519
+
520
+
521
+ </td>
522
+
523
+
524
+
525
+
526
+
527
+ <td class="description last"><p>the path part of the UL, <code>/</code> for an empty path.</p></td>
528
+ </tr>
529
+
530
+
531
+
532
+ <tr>
533
+
534
+ <td class="name"><code>url.hasPath</code></td>
535
+
536
+
537
+ <td class="type">
538
+
539
+
540
+ <span class="param-type">boolean</span>
541
+
542
+
543
+
544
+
545
+ </td>
546
+
547
+
548
+
549
+
550
+
551
+ <td class="description last"><p>whether or not the URL has a path, note that <code>/</code> is considered no path.</p></td>
552
+ </tr>
553
+
554
+
555
+ </tbody>
556
+ </table>
557
+
558
+
559
+
560
+
561
+
562
+
563
+ <div class="description usertext">
564
+ <p>A plain object represeting the information about about link that can get utilised in a template.</p>
565
+ <p>Note that the <code>uri</code> could contain more fields - it's initialised with output from the <code>URI.parse()</code> function from the <code>URI</code> module.</p>
566
+ </div>
567
+
568
+
569
+
570
+ <h5 class="h5-types">Type:</h5>
571
+ <ul>
572
+ <li>
573
+
574
+ <span class="param-type">Object</span>
575
+
576
+
577
+
578
+ </li>
579
+ </ul>
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+ <h4 class="name" id="plainPageInformationObject">plainPageInformationObject</h4>
589
+
590
+
591
+
592
+
593
+
594
+ <dl class="details">
595
+
596
+ <dt class="tag-description">Description:</dt>
597
+ <dd class="tag-description"><ul class="dummy"><li><p>A plain object representing the infomration extracted from a web page.</p>
598
+ <p>Note that the <code>uri</code> could contain more fields - it's initialised with output from the <code>URI.parse()</code> function from the <code>URI</code> module.</p></li></ul></dd>
599
+
600
+
601
+
602
+ <dt class="tag-source">Source:</dt>
603
+ <dd class="tag-source"><ul class="dummy"><li>
604
+ <a href="typedefs.jsdoc.html">typedefs.jsdoc</a>, <a href="typedefs.jsdoc.html#line37">line 37</a>
605
+ </li></ul></dd>
606
+
607
+
608
+
609
+
610
+
611
+
612
+
613
+
614
+
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+ <dt class="tag-see">See:</dt>
636
+ <dd class="tag-see">
637
+ <ul>
638
+ <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>
639
+ </ul>
640
+ </dd>
641
+
642
+
643
+
644
+ </dl>
645
+
646
+
647
+
648
+ <h5 class="subsection-title">Properties:</h5>
649
+
650
+
651
+
652
+ <table class="props">
653
+ <thead>
654
+ <tr>
655
+
656
+ <th>Name</th>
657
+
658
+
659
+ <th>Type</th>
660
+
661
+
662
+
663
+
664
+
665
+ <th class="last">Description</th>
666
+ </tr>
667
+ </thead>
668
+
669
+ <tbody>
670
+
671
+
672
+ <tr>
673
+
674
+ <td class="name"><code>url</code></td>
675
+
676
+
677
+ <td class="type">
678
+
679
+
680
+ <span class="param-type">string</span>
681
+
682
+
683
+
684
+
685
+ </td>
686
+
687
+
688
+
689
+
690
+
691
+ <td class="description last"><p>the page's URL.</p></td>
692
+ </tr>
693
+
694
+
695
+
696
+ <tr>
697
+
698
+ <td class="name"><code>title</code></td>
699
+
700
+
701
+ <td class="type">
702
+
703
+
704
+ <span class="param-type">string</span>
705
+
706
+
707
+
708
+
709
+ </td>
710
+
711
+
712
+
713
+
714
+
715
+ <td class="description last"><p>the page's title.</p></td>
716
+ </tr>
717
+
718
+
719
+
720
+ <tr>
721
+
722
+ <td class="name"><code>topLevelHeadings</code></td>
723
+
724
+
725
+ <td class="type">
726
+
727
+
728
+ <span class="param-type">Array.&lt;string></span>
729
+
730
+
731
+
732
+
733
+ </td>
734
+
735
+
736
+
737
+
738
+
739
+ <td class="description last"><p>the text from the page's <code>h1</code> tags.</p></td>
740
+ </tr>
741
+
742
+
743
+
744
+ <tr>
745
+
746
+ <td class="name"><code>secondaryHeadings</code></td>
747
+
748
+
749
+ <td class="type">
750
+
751
+
752
+ <span class="param-type">Array.&lt;string></span>
753
+
754
+
755
+
756
+
757
+ </td>
758
+
759
+
760
+
761
+
762
+
763
+ <td class="description last"><p>text from the page's <code>h2</code> tags.</p></td>
764
+ </tr>
765
+
766
+
767
+
768
+ <tr>
769
+
770
+ <td class="name"><code>mainHeading</code></td>
771
+
772
+
773
+ <td class="type">
774
+
775
+
776
+ <span class="param-type">string</span>
777
+
778
+
779
+
780
+
781
+ </td>
782
+
783
+
784
+
785
+
786
+
787
+ <td class="description last"><p>the text from the most semantically important heading that exists in the page.</p></td>
788
+ </tr>
789
+
790
+
791
+
792
+ <tr>
793
+
794
+ <td class="name"><code>uri</code></td>
795
+
796
+
797
+ <td class="type">
798
+
799
+
800
+ <span class="param-type">Object</span>
801
+
802
+
803
+
804
+
805
+ </td>
806
+
807
+
808
+
809
+
810
+
811
+ <td class="description last"><p>the URL's components</p></td>
812
+ </tr>
813
+
814
+
815
+
816
+ <tr>
817
+
818
+ <td class="name"><code>url.hostname</code></td>
819
+
820
+
821
+ <td class="type">
822
+
823
+
824
+ <span class="param-type">string</span>
825
+
826
+
827
+
828
+
829
+ </td>
830
+
831
+
832
+
833
+
834
+
835
+ <td class="description last"><p>the hostname part of the URL.</p></td>
836
+ </tr>
837
+
838
+
839
+
840
+ <tr>
841
+
842
+ <td class="name"><code>url.path</code></td>
843
+
844
+
845
+ <td class="type">
846
+
847
+
848
+ <span class="param-type">string</span>
849
+
850
+
851
+
852
+
853
+ </td>
854
+
855
+
856
+
857
+
858
+
859
+ <td class="description last"><p>the path part of the UL, <code>/</code> for an empty path.</p></td>
860
+ </tr>
861
+
862
+
863
+
864
+ <tr>
865
+
866
+ <td class="name"><code>url.hasPath</code></td>
867
+
868
+
869
+ <td class="type">
870
+
871
+
872
+ <span class="param-type">boolean</span>
873
+
874
+
875
+
876
+
877
+ </td>
878
+
879
+
880
+
881
+
882
+
883
+ <td class="description last"><p>whether or not the URL has a path, note that <code>/</code> is considered no path.</p></td>
884
+ </tr>
885
+
886
+
887
+ </tbody>
888
+ </table>
889
+
890
+
891
+
892
+
893
+
894
+
895
+ <div class="description usertext">
896
+ <p>A plain object representing the infomration extracted from a web page.</p>
897
+ <p>Note that the <code>uri</code> could contain more fields - it's initialised with output from the <code>URI.parse()</code> function from the <code>URI</code> module.</p>
898
+ </div>
899
+
900
+
901
+
902
+ <h5 class="h5-types">Type:</h5>
903
+ <ul>
904
+ <li>
905
+
906
+ <span class="param-type">Object</span>
907
+
908
+
909
+
910
+ </li>
911
+ </ul>
912
+
913
+
914
+
915
+
916
+
917
+
918
+
919
+
920
+
921
+
922
+
923
+ <h4 class="name" id="templateFieldFilterFunction"><span class="type-signature"></span>templateFieldFilterFunction<span class="signature">(originalString)</span><span class="type-signature"> &rarr; {string}</span></h4>
924
+
925
+
926
+
927
+
928
+
929
+
930
+ <dl class="details">
931
+
932
+ <dt class="tag-description">Description:</dt>
933
+ <dd class="tag-description"><ul class="dummy"><li><p>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.</p></li></ul></dd>
934
+
935
+
936
+
937
+ <dt class="tag-source">Source:</dt>
938
+ <dd class="tag-source"><ul class="dummy"><li>
939
+ <a href="typedefs.jsdoc.html">typedefs.jsdoc</a>, <a href="typedefs.jsdoc.html#line8">line 8</a>
940
+ </li></ul></dd>
941
+
942
+
943
+
944
+
945
+
946
+
947
+
948
+
949
+
950
+
951
+
952
+
953
+
954
+
955
+
956
+
957
+
958
+
959
+
960
+
961
+
962
+
963
+
964
+
965
+
966
+
967
+
968
+
969
+
970
+
971
+
972
+ </dl>
973
+
974
+
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+
986
+ <h5 class="h5-parameters">Parameters:</h5>
987
+
988
+
989
+ <table class="params">
990
+ <thead>
991
+ <tr>
992
+
993
+ <th>Name</th>
994
+
995
+
996
+ <th>Type</th>
997
+
998
+
999
+
1000
+
1001
+
1002
+ <th class="last">Description</th>
1003
+ </tr>
1004
+ </thead>
1005
+
1006
+ <tbody>
1007
+
1008
+
1009
+ <tr>
1010
+
1011
+ <td class="name"><code>originalString</code></td>
1012
+
1013
+
1014
+ <td class="type">
1015
+
1016
+
1017
+ <span class="param-type">string</span>
1018
+
1019
+
1020
+
1021
+
1022
+ </td>
1023
+
1024
+
1025
+
1026
+
1027
+
1028
+ <td class="description last"><p>the original value for the field to be filtered.</p></td>
1029
+ </tr>
1030
+
1031
+
1032
+ </tbody>
1033
+ </table>
1034
+
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+
1049
+
1050
+ <h5 class="h5-returns">Returns:</h5>
1051
+
1052
+
1053
+ <div class="param-desc">
1054
+ <p>the filtered version of the original string.</p>
1055
+ </div>
1056
+
1057
+
1058
+
1059
+ <dl class="param-type">
1060
+ <dt>
1061
+ Type
1062
+ </dt>
1063
+ <dd>
1064
+
1065
+ <span class="param-type">string</span>
1066
+
1067
+
1068
+
1069
+ </dd>
1070
+ </dl>
1071
+
1072
+
1073
+
1074
+
1075
+
1076
+
1077
+
1078
+ <h4 class="name" id="templateFieldFilterTuple">templateFieldFilterTuple</h4>
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+ <dl class="details">
1085
+
1086
+ <dt class="tag-description">Description:</dt>
1087
+ <dd class="tag-description"><ul class="dummy"><li><p>A tupple (array of length exactly two) for assigning a field filter to a template.</p></li></ul></dd>
1088
+
1089
+
1090
+
1091
+ <dt class="tag-source">Source:</dt>
1092
+ <dd class="tag-source"><ul class="dummy"><li>
1093
+ <a href="typedefs.jsdoc.html">typedefs.jsdoc</a>, <a href="typedefs.jsdoc.html#line15">line 15</a>
1094
+ </li></ul></dd>
1095
+
1096
+
1097
+
1098
+
1099
+
1100
+
1101
+
1102
+
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+
1109
+
1110
+
1111
+
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+ </dl>
1127
+
1128
+
1129
+
1130
+ <h5 class="subsection-title">Properties:</h5>
1131
+
1132
+
1133
+
1134
+ <table class="props">
1135
+ <thead>
1136
+ <tr>
1137
+
1138
+ <th>Name</th>
1139
+
1140
+
1141
+ <th>Type</th>
1142
+
1143
+
1144
+
1145
+
1146
+
1147
+ <th class="last">Description</th>
1148
+ </tr>
1149
+ </thead>
1150
+
1151
+ <tbody>
1152
+
1153
+
1154
+ <tr>
1155
+
1156
+ <td class="name"><code>0</code></td>
1157
+
1158
+
1159
+ <td class="type">
1160
+
1161
+
1162
+ <span class="param-type">"all"</span>
1163
+ |
1164
+
1165
+ <span class="param-type">"url"</span>
1166
+ |
1167
+
1168
+ <span class="param-type">"text"</span>
1169
+ |
1170
+
1171
+ <span class="param-type">"description"</span>
1172
+
1173
+
1174
+
1175
+
1176
+ </td>
1177
+
1178
+
1179
+
1180
+
1181
+
1182
+ <td class="description last"><p>the property the filter should be applied to.</p></td>
1183
+ </tr>
1184
+
1185
+
1186
+
1187
+ <tr>
1188
+
1189
+ <td class="name"><code>1</code></td>
1190
+
1191
+
1192
+ <td class="type">
1193
+
1194
+
1195
+ <span class="param-type"><a href="global.html#templateFieldFilterFunction">templateFieldFilterFunction</a></span>
1196
+
1197
+
1198
+
1199
+
1200
+ </td>
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+ <td class="description last"><p>the filter function to apply.</p></td>
1207
+ </tr>
1208
+
1209
+
1210
+ </tbody>
1211
+ </table>
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+ <div class="description usertext">
1219
+ <p>A tupple (array of length exactly two) for assigning a field filter to a template.</p>
1220
+ </div>
1221
+
1222
+
1223
+
1224
+ <h5 class="h5-types">Type:</h5>
1225
+ <ul>
1226
+ <li>
1227
+
1228
+ <span class="param-type">Array</span>
1229
+
1230
+
1231
+
1232
+ </li>
1233
+ </ul>
1234
+
1235
+
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+ </article>
1245
+
1246
+ </section>
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+ </div>
1254
+
1255
+ <br class="clear">
1256
+
1257
+ <footer>
1258
+ 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.
1259
+ </footer>
1260
+
1261
+ <script>prettyPrint();</script>
1262
+ <script src="scripts/polyfill.js"></script>
1263
+ <script src="scripts/linenumber.js"></script>
1264
+
1265
+ <script src="scripts/search.js" defer></script>
1266
+
1267
+
1268
+
1269
+ <link type="text/css" rel="stylesheet" href="./docdash-overrides.css">
1270
+
1271
+ <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
1272
+
1273
+ <script src="./mermaid-init.js"></script>
1274
+
1275
+ </body>
1276
+ </html>