<commit_before>var pathUtil = require('path');

var modifiers,
    filters,
    patterns;

patterns = {    // functions are used, so the regular expression object is always new
    jsFiles: function jsFiles() { return /\.js$/gi; },
    nodeModules: function nodeModules() { return /.*node_modules\//gi; },
    classes: function classes() { return /\.class\.js$/gi; },
    alamidFiles: function alamidFiles() { return /node_modules\/alamid\/.*\.js/gi; },
    serverFiles: function serverFiles() { return /((\.server(\.class)?)|((\.class)?\.server))\.js$/gi; },
    clientFiles: function clientFiles() { return /((\.client(\.class)?)|((\.class)?\.client))\.js$/gi; }
};

modifiers = {
    normalize: pathUtil.normalize,
    nodeModules: function nodeModules(path) {
        if (path.charAt(0) === '.') {
            return path;
        } else {
            path = path.replace(patterns.nodeModules(), 'node_modules/');
            path = pathUtil.normalize(path);
            return path;
        }
    }
};

filters = {
    noClasses: function noClasses(path) {
        return patterns.classes().test(path) === false;
    },
    onlyClasses: function onlyClasses(path) {
        return patterns.classes().test(path);
    },
    noAlamidFiles: function noAlamidFiles(path) {
        return patterns.alamidFiles().test(path) === false;
    },<commit_msg>changed the path modifier to be non-greedy<commit_after>var pathUtil = require('path');

var modifiers,
    filters,
    patterns;

patterns = {    // functions are used, so the regular expression object is always new
    jsFiles: function jsFiles() { return /\.js$/gi; },
    nodeModules: function nodeModules() { return /.*?node_modules\//gi; },
    classes: function classes() { return /\.class\.js$/gi; },
    alamidFiles: function alamidFiles() { return /node_modules\/alamid\/.*\.js/gi; },
    serverFiles: function serverFiles() { return /((\.server(\.class)?)|((\.class)?\.server))\.js$/gi; },
    clientFiles: function clientFiles() { return /((\.client(\.class)?)|((\.class)?\.client))\.js$/gi; }
};

modifiers = {
    normalize: pathUtil.normalize,
    nodeModules: function nodeModules(path) {
        if (path.charAt(0) === '.') {
            return path;
        } else {
            path = path.replace(patterns.nodeModules(), 'node_modules/');
            path = pathUtil.normalize(path);
            return path;
        }
    }
};

filters = {
    noClasses: function noClasses(path) {
        return patterns.classes().test(path) === false;
    },
    onlyClasses: function onlyClasses(path) {
        return patterns.classes().test(path);
    },
    noAlamidFiles: function noAlamidFiles(path) {
        return patterns.alamidFiles().test(path) === false;
    },
{'fraction_non_alphanumeric': 0.1711777615215801, 'fraction_numerical': 0.000731528895391368, 'mean_word_length': 2.777624309392265, 'pattern_counts': {'":': 0, '<': 3, '<?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': '575007', 'n_tokens_mistral': 851, 'n_tokens_neox': 826, 'n_words': 176}