<commit_before>'use strict';

function parse(sdf, options) {
    var options=options || {};
    var include=options.include;
    var exclude=options.exclude;
    var filter=options.filter;
    var modifiers=options.modifiers || {};
    var forEach=options.forEach || {};
    if (typeof sdf !== 'string') {
        throw new TypeError('Parameter "sdf" must be a string');
    }

    var crlf = '\n';
    if (options.mixedEOL) {
        sdf=sdf.replace(/\r\n/g, "\n");
        sdf=sdf.replace(/\r/g, "\n");
    } else {
        // we will find the delimiter in order to be much faster and not use regular expression
        var header = sdf.substr(0, 1000);
        if (header.indexOf('\r\n') > -1) {
            crlf = '\r\n';
        } else if (header.indexOf('\r') > -1) {
            crlf = '\r';
        }
    }

    var sdfParts = sdf.split(new RegExp(eol+'\\$\\$\\$\\$.*'+eol));
    var molecules = [];
    var labels = {};

    var start = Date.now();<commit_msg>fix variable name crlf versus eol<commit_after>'use strict';

function parse(sdf, options) {
    var options=options || {};
    var include=options.include;
    var exclude=options.exclude;
    var filter=options.filter;
    var modifiers=options.modifiers || {};
    var forEach=options.forEach || {};
    if (typeof sdf !== 'string') {
        throw new TypeError('Parameter "sdf" must be a string');
    }

    var eol = '\n';
    if (options.mixedEOL) {
        sdf=sdf.replace(/\r\n/g, "\n");
        sdf=sdf.replace(/\r/g, "\n");
    } else {
        // we will find the delimiter in order to be much faster and not use regular expression
        var header = sdf.substr(0, 1000);
        if (header.indexOf('\r\n') > -1) {
            eol = '\r\n';
        } else if (header.indexOf('\r') > -1) {
            eol = '\r';
        }
    }

    var sdfParts = sdf.split(new RegExp(eol+'\\$\\$\\$\\$.*'+eol));
    var molecules = [];
    var labels = {};

    var start = Date.now();
{'fraction_non_alphanumeric': 0.17800511508951405, 'fraction_numerical': 0.007161125319693095, 'mean_word_length': 2.1346153846153846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5779214', 'n_tokens_mistral': 672, 'n_tokens_neox': 653, 'n_words': 166}