<commit_before>"use strict";
var trim = a => a.trim();
function parseKV(string) {
    var spliter, equals, decode;
    for (var cx = 1, dx = arguments.length; cx < dx; cx++) {
        var a = arguments[cx];
        if (typeof a === 'string') {
            if (!spliter) spliter = a;
            else if (!equals) equals = a;
        }
        else {
            decode = a;
        }
    }
    if (!spliter) spliter = '&';
    if (!equals) equals = '=';
    if (decode === void 0) decode = spliter === "&" && equals === "=" ? decodeURIComponent : trim;
    var object = {};
    if (typeof string === "string") {
        var kvs = string.split(spliter);
        for (var cx = 0, dx = kvs.length; cx < dx; cx++) {
            var kv = kvs[cx];
            if (!kv) continue;
            var index = kv.indexOf(equals);
            if (index < 0) index = kv.length;
            var k = kv.slice(0, index);
            var v = kv.slice(index + 1);
            if (isFunction(decode)) {
                k = decode(k);
                v = decode(v);
            }
            if (index === kv.length) v = undefined;
            if (k in object && v !== undefined) {
                if (object[k] instanceof Array);
                else if (object[k] !== undefined) object[k] = [object[k]];
                else object[k] = [];
                if (v !== undefined) object[k].push(v);
            }
            else {
                object[k] = v;
            }
        }
    }
    return object;
}
module.exports = parseKV;<commit_msg>解决开发环境配置参数后无法启动的问题<commit_after>"use strict";
var trim = a => a.trim();
function parseKV(string) {
    var spliter, equals, decode;
    for (var cx = 1, dx = arguments.length; cx < dx; cx++) {
        var a = arguments[cx];
        if (typeof a === 'string') {
            if (!spliter) spliter = a;
            else if (!equals) equals = a;
        }
        else {
            decode = a;
        }
    }
    if (!spliter) spliter = '&';
    if (!equals) equals = '=';
    if (decode === void 0) decode = spliter === "&" && equals === "=" ? decodeURIComponent : trim;
    var object = {};
    if (typeof string === "string") {
        var kvs = string.split(spliter);
        for (var cx = 0, dx = kvs.length; cx < dx; cx++) {
            var kv = kvs[cx];
            if (!kv) continue;
            var index = kv.indexOf(equals);
            if (index < 0) index = kv.length;
            var k = kv.slice(0, index);
            var v = kv.slice(index + 1);
            if (typeof decode === 'function') {
                k = decode(k);
                v = decode(v);
            }
            if (index === kv.length) v = undefined;
            if (k in object && v !== undefined) {
                if (object[k] instanceof Array);
                else if (object[k] !== undefined) object[k] = [object[k]];
                else object[k] = [];
                if (v !== undefined) object[k].push(v);
            }
            else {
                object[k] = v;
            }
        }
    }
    return object;
}
module.exports = parseKV;
{'fraction_non_alphanumeric': 0.1565245688252522, 'fraction_numerical': 0.0039049788480312398, 'mean_word_length': 1.4670947030497592, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7110377', 'n_tokens_mistral': 953, 'n_tokens_neox': 934, 'n_words': 271}