<commit_before>'use strict';

var path = require('path'),
    logger = require('./logger'),
    progressFactory = require('./progressFactory');

/**
 * @private
 * @type {String}
 */
var MESSAGE_FORMAT = '{white:%d% %s}';

/**
 * @private
 * @function
 * @param {String} filename
 * @param {Number} p
 * @param {String} msg
 */
function progressCallback(filename, p, msg) {
    filename = path.resolve(filename);

    var percentage = Math.floor(p * 100),
        progress = progressFactory(filename);

    if (p === 1) {
        delete progressFactory.caches[filename];

        msg += '\n';
    }

    progress.tick({
        prefix: logger.COMPILED_PREFIX,
        message: logger.format(MESSAGE_FORMAT, percentage, msg)
    });
}

/**
 * @private
 * @module webpack-glob/lib/progressCallback
 */
module.exports = progressCallback;<commit_msg>docs(progressCallback): updates `jsdoc`<commit_after>'use strict';

var path = require('path'),
    logger = require('./logger'),
    progressFactory = require('./progressFactory');

/**
 * @private
 * @type {String}
 */
var MESSAGE_FORMAT = '{white:%d% %s}';

/**
 * @function
 * @alias progressCallback
 * @param {String} filename
 * @param {Number} p
 * @param {String} msg
 */
function progressCallback(filename, p, msg) {
    filename = path.resolve(filename);

    var percentage = Math.floor(p * 100),
        progress = progressFactory(filename);

    if (p === 1) {
        delete progressFactory.caches[filename];

        msg += '\n';
    }

    progress.tick({
        prefix: logger.COMPILED_PREFIX,
        message: logger.format(MESSAGE_FORMAT, percentage, msg)
    });
}

/**
 * @private
 * @module webpack-glob/lib/progressCallback
 * @returns {progressCallback}
 */
module.exports = progressCallback;
{'fraction_non_alphanumeric': 0.16156462585034015, 'fraction_numerical': 0.0045351473922902496, 'mean_word_length': 3.3048780487804876, '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': '5865142', 'n_tokens_mistral': 536, 'n_tokens_neox': 520, 'n_words': 120}