blun-king-cli 9.1.274 → 9.1.275
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.
|
@@ -89,7 +89,16 @@ function cleanText(value, maxChars = 240) {
|
|
|
89
89
|
|
|
90
90
|
function cleanList(value, maxItems = 5) {
|
|
91
91
|
if (!Array.isArray(value)) return [];
|
|
92
|
-
|
|
92
|
+
const unique = [];
|
|
93
|
+
const seen = new Set();
|
|
94
|
+
for (const item of value) {
|
|
95
|
+
const text = cleanText(item, 160);
|
|
96
|
+
if (!text || seen.has(text)) continue;
|
|
97
|
+
seen.add(text);
|
|
98
|
+
unique.push(text);
|
|
99
|
+
if (unique.length >= maxItems) break;
|
|
100
|
+
}
|
|
101
|
+
return unique;
|
|
93
102
|
}
|
|
94
103
|
|
|
95
104
|
function addField(lines, label, value) {
|