@wral/active-alerts 0.2.2 → 0.2.3
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/define.mjs
CHANGED
|
@@ -585,7 +585,7 @@ const Rt = {
|
|
|
585
585
|
lg: 1366
|
|
586
586
|
}, zt = "https://api.wral.com/alerts/v1/active/alerts", Lt = "https://assets.wral.com/a1cc0e86-adab-48e9-bd80-703cd2c56aff?w=1200&h=630", jt = (i) => String(i || "Alert").replace(/[^\p{L}\p{N}]/gu, " ").replace(/\s+/g, " ").trim() || "Alert", Dt = (i) => {
|
|
587
587
|
if (!i) return null;
|
|
588
|
-
const t = i.url || i.href || "", e = i.title || i.headline || "";
|
|
588
|
+
const t = i.link || i.url || i.href || "", e = i.title || i.headline || "";
|
|
589
589
|
if (!e) return null;
|
|
590
590
|
const s = String(i.topic || "").trim(), r = s.toLowerCase(), n = i.caption || s || "Alert", o = i.image || i.imageUrl || i.image_url || Lt;
|
|
591
591
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ const p = {
|
|
|
4
4
|
lg: 1366
|
|
5
5
|
}, h = "https://api.wral.com/alerts/v1/active/alerts", g = "https://assets.wral.com/a1cc0e86-adab-48e9-bd80-703cd2c56aff?w=1200&h=630", u = (e) => String(e || "Alert").replace(/[^\p{L}\p{N}]/gu, " ").replace(/\s+/g, " ").trim() || "Alert", v = (e) => {
|
|
6
6
|
if (!e) return null;
|
|
7
|
-
const t = e.url || e.href || "", s = e.title || e.headline || "";
|
|
7
|
+
const t = e.link || e.url || e.href || "", s = e.title || e.headline || "";
|
|
8
8
|
if (!s) return null;
|
|
9
9
|
const a = String(e.topic || "").trim(), l = a.toLowerCase(), r = e.caption || a || "Alert", n = e.image || e.imageUrl || e.image_url || g;
|
|
10
10
|
return {
|