implemented frontend including separate message system; started to implement backend

This commit is contained in:
User
2026-03-10 14:48:48 +01:00
committed by Jannik Luboeinski
parent 4275cbd795
commit 78d5352a48
1058 changed files with 101527 additions and 1 deletions

37
yjs-poll/node_modules/lib0/url.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
/**
* Utility module to work with urls.
*
* @module url
*/
import * as object from './object.js'
/**
* Parse query parameters from an url.
*
* @param {string} url
* @return {Object<string,string>}
*/
export const decodeQueryParams = url => {
/**
* @type {Object<string,string>}
*/
const query = {}
const urlQuerySplit = url.split('?')
const pairs = urlQuerySplit[urlQuerySplit.length - 1].split('&')
for (let i = 0; i < pairs.length; i++) {
const item = pairs[i]
if (item.length > 0) {
const pair = item.split('=')
query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || '')
}
}
return query
}
/**
* @param {Object<string,string>} params
* @return {string}
*/
export const encodeQueryParams = params =>
object.map(params, (val, key) => `${encodeURIComponent(key)}=${encodeURIComponent(val)}`).join('&')