mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-08 21:05:21 +00:00
7 lines
375 B
JavaScript
7 lines
375 B
JavaScript
export const topicUrl = (baseUrl, topic) => `${baseUrl}/${topic}`;
|
|
export const topicUrlWs = (baseUrl, topic) => `${topicUrl(baseUrl, topic)}/ws`
|
|
.replaceAll("https://", "wss://")
|
|
.replaceAll("http://", "ws://");
|
|
export const shortUrl = (url) => url.replaceAll(/https?:\/\//g, "");
|
|
export const shortTopicUrl = (baseUrl, topic) => shortUrl(topicUrl(baseUrl, topic));
|