<commit_before>var chalk = require('chalk');
var moment = require('moment');

var lastlog = undefined;
var dups = 0;

module.exports = function() {
    var args = Array.prototype.slice.call(arguments);
    var name = args[0];
    var message = args.slice(1).join(' ');
    var text = chalk.yellow('[' + name + '] ');
    var stamp = chalk.grey('[' + moment().format('HH:mm:ss') + '] ');
    if(message) {
        text += message;
    }
    if(lastlog === text) {
        dups += 1;
        process.stdout.write('\r' + stamp + text + chalk.grey(' -- x' + dups));
    } else {
        dups = 0;
        process.stdout.write('\n' + stamp + text);
    }
    lastlog = text;
}
<commit_msg>Start duplicate count at 1, not 0.<commit_after>var chalk = require('chalk');
var moment = require('moment');

var lastlog = undefined;
var dups = 0;

module.exports = function() {
    var args = Array.prototype.slice.call(arguments);
    var name = args[0];
    var message = args.slice(1).join(' ');
    var text = chalk.yellow('[' + name + '] ');
    var stamp = chalk.grey('[' + moment().format('HH:mm:ss') + '] ');
    if(message) {
        text += message;
    }
    if(lastlog === text) {
        dups += 1;
        process.stdout.write('\r' + stamp + text + chalk.grey(' -- x' + dups));
    } else {
        dups = 1;
        process.stdout.write('\n' + stamp + text);
    }
    lastlog = text;
}

{'fraction_non_alphanumeric': 0.1929445644348452, 'fraction_numerical': 0.008639308855291577, 'mean_word_length': 2.492462311557789, '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': '5339175', 'n_tokens_mistral': 488, 'n_tokens_neox': 469, 'n_words': 110}