Restructure

This commit is contained in:
Philipp Heckel 2022-02-20 16:55:55 -05:00
parent 8c0f3b2304
commit c6c3caec39
7 changed files with 6 additions and 13 deletions

View file

@ -1,6 +0,0 @@
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));