<commit_before>/**
 * filter by file extension
 */

var Url = require('url');

function FileExtension() {
}
FileExtension.prototype.resolve = function(url, clbk) {

    var pathname = Url.parse(url).pathname;

    if (!pathname) return;

    if (pathname.match(/\.(png|jpg|jpeg|gif|bmp|svg)$/i)) {
        clbk(url);
        return;
    }

    clbk(null);
};

module.exports = FileExtension;<commit_msg>Correction<commit_after>/**
 * filter by file extension
 */

var Url = require('url');

function FileExtension() {
}
FileExtension.prototype.resolve = function(url, clbk) {

    var pathname = Url.parse(url).pathname;

    if (!pathname){
      clbk(null);
      return;
    }

    if (pathname.match(/\.(png|jpg|jpeg|gif|bmp|svg)$/i)) {
        clbk(url);
        return;
    }

    clbk(null);
};

module.exports = FileExtension;
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.0, 'mean_word_length': 3.033816425120773, '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': '4911570', 'n_tokens_mistral': 305, 'n_tokens_neox': 286, 'n_words': 52}