<commit_before>importScripts('../dist/yatern.js');

addEventListener('message', function (e) {
    var data = e.data;
    //console.log(e.data.code);
    var t1 = (new Date).getTime();
    var gObject = YAtern.analyze(e.data.code);
    var t2 = (new Date).getTime();
    console.log("Time spent: " + (t2 - t1));

    var message = {};

    var typeNames = '';
    var propNames = '';

    var types = gObject.getProp('x').types;
    for (var i = 0; i < types.length; i++) {
        typeNames += types[i].name + '\n';
        if (types[i].props) {
            propNames += Object.getOwnPropertyNames(types[i].props) + '\n';
        }
    }
    message.typeNames = typeNames;
    message.propNames = propNames;

    postMessage(message);
});
<commit_msg>[TASK] Adjust web_tests for Map and Set data structure.<commit_after>importScripts('../dist/yatern.js');

addEventListener('message', function (e) {
    var t1 = (new Date).getTime();
    var gObject = YAtern.analyze(e.data.code);
    var t2 = (new Date).getTime();
    console.log("Time spent: " + (t2 - t1));

    var message = {};

    var typeNames = '';
    var propNames = '';

    var types = gObject.getProp('x').types;

    types.forEach(function (type) {
        typeNames += type.name + ', ';
        if (type.props) {
            type.props.forEach(function (value, key) {
                propNames += key + ', ';
            });
        }
    });
    message.typeNames = typeNames;
    message.propNames = propNames;

    postMessage(message);
});

{'fraction_non_alphanumeric': 0.17250495703899538, 'fraction_numerical': 0.005948446794448116, 'mean_word_length': 2.4566210045662102, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '5859146', 'n_tokens_mistral': 502, 'n_tokens_neox': 489, 'n_words': 104}