<commit_before>function fetchAsyncSignals(mode, customFunction, customKey) {
    console.log("Going to fetch signals");
    var eids = "";
    switch (mode) {
        case 1:
            if (pbjs && pbjs.getUserIdsAsEids && typeof pbjs.getUserIdsAsEids === "function") {
                eids = pbjs.getUserIdsAsEids(); // Get Identities from Prebid API in oRTB eids structure
            }
            break;
        case 2:
            if (owpbjs && owpbjs.getUserIdsAsEids && typeof owpbjs.getUserIdsAsEids === "function") {
                eids = owpbjs.getUserIdsAsEids(); //Get Identities from Identity Hub  API in oRTB eids structure
            }
            break;
        case 3:
            if (typeof customFunction === "function") {
                eids = customFunction(); //Get Identities from Custom function provided
            }
            break;

        default:
            eids = "Hello eids"; // Demo data

    }
    var dataKey = "eids" // Default key is eids
    if (customKey && customKey.length > 0) {
        dataKey = customKey; // Using custom key for data if passed  
    }
    var rawSignal = {}
    rawSignal[dataKey] = eids;
    signals = encryptSignals(JSON.stringify(rawSignal))
    promise = Promise.resolve(signals);
    console.log("fetching Signals: " + signals);
    return promise;
};

function encryptSignals(signals) {
    return btoa(signals); // Test encryption. To be replaced with better algo
};<commit_msg>Indentation fix<commit_after>function fetchAsyncSignals(mode, customFunction, customKey) {
	console.log("Going to fetch signals");
	var eids = "";
	switch (mode) {
		case 1:
			if (pbjs && pbjs.getUserIdsAsEids && typeof pbjs.getUserIdsAsEids === "function") {
				eids = pbjs.getUserIdsAsEids(); // Get Identities from Prebid API in oRTB eids structure
			}
			break;
		case 2:
			if (owpbjs && owpbjs.getUserIdsAsEids && typeof owpbjs.getUserIdsAsEids === "function") {
				eids = owpbjs.getUserIdsAsEids(); //Get Identities from Identity Hub  API in oRTB eids structure
			}
			break;
		case 3:
			if (typeof customFunction === "function") {
				eids = customFunction(); //Get Identities from Custom function provided
			}
			break;

		default:
			eids = "Hello eids"; // Demo data

	}
	var dataKey = "eids" // Default key is eids
	if (customKey && customKey.length > 0) {
		dataKey = customKey; // Using custom key for data if passed  
	}
	var rawSignal = {}
	rawSignal[dataKey] = eids;
	var signals = encryptSignals(JSON.stringify(rawSignal))
	promise = Promise.resolve(signals);
	console.log("fetching Signals: " + signals);
	return promise;
};

function encryptSignals(signals) {
	return btoa(signals); // Test encryption. To be replaced with better algo
};
{'fraction_non_alphanumeric': 0.11102941176470588, 'fraction_numerical': 0.0029411764705882353, 'mean_word_length': 2.78442280945758, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4989624', 'n_tokens_mistral': 893, 'n_tokens_neox': 839, 'n_words': 240}