UNPKG

@cimo/websocket

Version:

Websocket (server/client). Light, fast and secure.

21 lines 556 B
export const writeLog = (tag, value) => { console.log(`WriteLog => ${tag}: `, value); }; export const jsonCheck = (value) => { try { JSON.parse(value); return true; } catch { return false; } }; export const base64ToUtf8 = (base64) => { const decoded = window.atob(base64); let encoded = ""; for (let a = 0; a < decoded.length; a++) { encoded += "%" + ("00" + decoded.charCodeAt(a).toString(16)).slice(-2); } return decodeURIComponent(encoded); }; //# sourceMappingURL=HelperSrc.js.map