<commit_before>var crypto = require('crypto');
var util = require('util');
var stringifyUri = require('./sip').stringifyUri; 

function unq(a) {
  if(a && a[0] === '"' && a[a.length-1] === '"')
    return a.substr(1, a.length - 2);
  return a;
}

function q(a) {
  if(a && a[0] !== '"')
    return ['"', a, '"'].join('');
  return a;
}

function lowercase(a) {
  if(typeof a === 'string')
    return a.toLowerCase();
  return a;
}

function kd() {
  var hash = crypto.createHash('md5');

  var a = Array.prototype.join.call(arguments, ':');<commit_msg>digest.js: fixed quiting of empty strings<commit_after>var crypto = require('crypto');
var util = require('util');
var stringifyUri = require('./sip').stringifyUri; 

function unq(a) {
  if(a && a[0] === '"' && a[a.length-1] === '"')
    return a.substr(1, a.length - 2);
  return a;
}

function q(a) {
  if(typeof a === 'string' && a[0] !== '"')
    return ['"', a, '"'].join('');
  return a;
}

function lowercase(a) {
  if(typeof a === 'string')
    return a.toLowerCase();
  return a;
}

function kd() {
  var hash = crypto.createHash('md5');

  var a = Array.prototype.join.call(arguments, ':');
{'fraction_non_alphanumeric': 0.23177083333333334, 'fraction_numerical': 0.010416666666666666, 'mean_word_length': 3.686991869918699, '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': '6130108', 'n_tokens_mistral': 432, 'n_tokens_neox': 428, 'n_words': 99}