<commit_before>function checkAssert(value, desc)
{
    var ul = document.createElement("ul");
    ul.id = "results";
    document.body.appendChild(ul);
    var li = document.createElement("li");
    li.style.color = value ? "green" : "red";
    li.appendChild(document.createTextNode(desc));
    document.getElementById("results").appendChild(li);
}<commit_msg>add checkAssertLog function to show the result of assert in console<commit_after>//Returns the result of assert in html, green for true and red for false
function checkAssert(value, desc)
{
    var ul = document.createElement("ul");
    ul.id = "results";
    document.body.appendChild(ul);
    var li = document.createElement("li");
    li.style.color = value ? "green" : "red";
    li.appendChild(document.createTextNode(desc));
    document.getElementById("results").appendChild(li);
}
//Returns the result of assert in console (developer tools, firebug, etc), green for true and red for false
function checkAssertLog(value, desc)
{
    //if Browser is IE use console.info for pass and console.error for fail
    //because IE does not support style in log
    if(msie())
    {
        return  value ? console.info(desc) : console.error(desc);
    }
    value ? console.log('%c'+desc, 'color:green;') : console.log('%c'+desc, 'color:red;');
}
//check if browser is IE
function msie() {
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf("MSIE");
    var trident = ua.indexOf("Trident");
    if (msie > 0 || trident > 0) {
        return true;
    }
    return false;
}
{'fraction_non_alphanumeric': 0.13768584356819652, 'fraction_numerical': 0.001292824822236587, 'mean_word_length': 3.6626506024096384, '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': '1917974', 'n_tokens_mistral': 464, 'n_tokens_neox': 457, 'n_words': 136}