<commit_before>var crypto = require('crypto');
var file = require('./file');

function md5sum (filename, expected) {
  var checksum = crypto.createHash('md5');
  var code = file.read(filename);
  checksum.update(code);
  return expected === checksum.digest('hex');
}

module.exports = md5sum;<commit_msg>if node expected is passed, return the checksum<commit_after>var crypto = require('crypto');
var file = require('./file');

function md5sum (filename, expected) {
  var checksum = crypto.createHash('md5');
  var code = file.read(filename);
  checksum.update(code);
  var got = checksum.digest('hex');
  return expected ? expected === got : got;
}

module.exports = md5sum;
{'fraction_non_alphanumeric': 0.15532544378698224, 'fraction_numerical': 0.008875739644970414, 'mean_word_length': 5.154545454545454, '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': '5789148', 'n_tokens_mistral': 209, 'n_tokens_neox': 205, 'n_words': 55}