@bartificer/linkify 2.3.1 → 2.3.2
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/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/defaults.mjs +11 -0
- package/src/utilities.mjs +3 -2
package/package.json
CHANGED
package/src/defaults.mjs
CHANGED
|
@@ -51,18 +51,24 @@ export const speciallyCapitalisedWords = [
|
|
|
51
51
|
'MLB',
|
|
52
52
|
'NFL',
|
|
53
53
|
'NASCAR',
|
|
54
|
+
'FIFA',
|
|
54
55
|
'TV',
|
|
55
56
|
'VR',
|
|
56
57
|
'BAFTA',
|
|
57
58
|
'BBC',
|
|
58
59
|
'AI',
|
|
59
60
|
'VP',
|
|
61
|
+
'II',
|
|
62
|
+
'III',
|
|
63
|
+
'IV',
|
|
60
64
|
|
|
61
65
|
// tech jargon
|
|
62
66
|
'iOS',
|
|
63
67
|
'macOS',
|
|
68
|
+
'iPhone',
|
|
64
69
|
'iPad',
|
|
65
70
|
'iPod',
|
|
71
|
+
'AirTag',
|
|
66
72
|
'iPadOS',
|
|
67
73
|
'watchOS',
|
|
68
74
|
'tvOS',
|
|
@@ -70,7 +76,12 @@ export const speciallyCapitalisedWords = [
|
|
|
70
76
|
'AirPods',
|
|
71
77
|
'MacBook',
|
|
72
78
|
'iTunes',
|
|
79
|
+
'WWDC',
|
|
80
|
+
'XDR',
|
|
73
81
|
'XProtect',
|
|
82
|
+
'VESA',
|
|
83
|
+
'HDMI',
|
|
84
|
+
'DisplayPort',
|
|
74
85
|
'LinkedIn',
|
|
75
86
|
'ChatGPT'
|
|
76
87
|
];
|
package/src/utilities.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import URI from 'urijs';
|
|
2
2
|
import * as urlSlug from 'url-slug';
|
|
3
|
-
import
|
|
3
|
+
import * as titleCase from "title-case";
|
|
4
4
|
import * as defaults from './defaults.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -125,7 +125,8 @@ export function extractSlug(url, words){
|
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
// convert the title to title case
|
|
128
|
-
|
|
128
|
+
titleCase.SMALL_WORDS.add('is');
|
|
129
|
+
title = titleCase.titleCase(title);
|
|
129
130
|
|
|
130
131
|
// fix any words with unusual customisations
|
|
131
132
|
title = batchFixCustomWordCases(title, words);
|