Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.10/@smithy/querystring-parser/dist-es/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.10/@smithy/querystring-parser/dist-es/index.js

export function parseQueryString(querystring) {
    const query = {};
    querystring = querystring.replace(/^\?/, "");
    if (querystring) {
        for (const pair of querystring.split("&")) {
            let [key, value = null] = pair.split("=");
            key = decodeURIComponent(key);
            if (value) {
                value = decodeURIComponent(value);
            }
            if (!(key in query)) {
                query[key] = value;
            }
            else if (Array.isArray(query[key])) {
                query[key].push(value);
            }
            else {
                query[key] = [query[key], value];
            }
        }
    }
    return query;
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists