@eso-status/forum-message 2.0.0-dev.15 → 2.0.0-dev.16
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/lib/connector.js +13 -1
- package/package.json +2 -2
package/lib/connector.js
CHANGED
|
@@ -73,7 +73,10 @@ class Connector {
|
|
|
73
73
|
replace() {
|
|
74
74
|
const list = [];
|
|
75
75
|
this.raw.forEach((raw) => {
|
|
76
|
-
|
|
76
|
+
raw.split('<br').forEach((line) => {
|
|
77
|
+
const split = line.split('/>');
|
|
78
|
+
list.push(split.join(''));
|
|
79
|
+
});
|
|
77
80
|
});
|
|
78
81
|
this.raw = list.map((raw) => {
|
|
79
82
|
let initialRaw = raw;
|
|
@@ -83,6 +86,15 @@ class Connector {
|
|
|
83
86
|
initialRaw = initialRaw.replace(' Thank you for your patience.', '');
|
|
84
87
|
initialRaw = initialRaw.replace(' We will update as new information becomes available.', '');
|
|
85
88
|
initialRaw = initialRaw.replace(' If you continue to experience difficulties at login, please restart your client. Thank you for your patience!', '');
|
|
89
|
+
if (initialRaw.includes('\t')) {
|
|
90
|
+
const split = initialRaw.split('\t');
|
|
91
|
+
if (split[0] === ' ') {
|
|
92
|
+
return split[1];
|
|
93
|
+
}
|
|
94
|
+
if (split[0].includes('•')) {
|
|
95
|
+
return `• ${split[1]}`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
86
98
|
if (initialRaw.endsWith(' ')) {
|
|
87
99
|
initialRaw = initialRaw.substring(0, initialRaw.length - 1);
|
|
88
100
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eso-status/forum-message",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.16",
|
|
4
4
|
"description": "Library for retrieving and formatting data, available at https://forums.elderscrollsonline.com or https://forums.elderscrollsonline.com/en/categories/pts",
|
|
5
5
|
"author": "@dov118 <contact@dov118.dev> (https://dov118.dev)",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"moment": "2.30.1"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@types/jest": "29.5.
|
|
96
|
+
"@types/jest": "29.5.14",
|
|
97
97
|
"eslint": "8.57.1",
|
|
98
98
|
"eslint-config-airbnb-base": "15.0.0",
|
|
99
99
|
"eslint-config-airbnb-typescript": "18.0.0",
|