<commit_before>var QRCode = require('./../vendor/QRCode'),
    QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'),
    colors = require('colors'),
    black = "  ",
    white = "  ".white.inverse,
    toCell = function (isBlack) {
        return isBlack ? black : white;
    },
    repeat = function (color) {
        return {
            times: function (count) {
                return new Array(count).join(color);
            }
        };
    };

module.exports = {
    generate: function (input, cb) {
        var qrcode = new QRCode(-1, QRErrorCorrectLevel.H);
        qrcode.addData(input);
        qrcode.make();

        var output = "",
            border = repeat(white).times(qrcode.getModuleCount() + 3)  + "\n";

        output += border;
        qrcode.modules.forEach(function (row) {
            output += white;
            output += row.map(toCell).join(''); 
            output += white + "\n";
        });
        output += border;

        if (cb) cb(output);
        else console.log(output);
    }
};<commit_msg>[lib] Update formatting for consistency.<commit_after>var QRCode = require('./../vendor/QRCode'),
    QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'),
    colors = require('colors'),
    black = "  ",
    white = "  ".white.inverse,
    toCell = function (isBlack) {
        return isBlack ? black : white;
    },
    repeat = function (color) {
        return {
            times: function (count) {
                return new Array(count).join(color);
            }
        };
    };

module.exports = {
    generate: function (input, cb) {
        var qrcode = new QRCode(-1, QRErrorCorrectLevel.H);
        qrcode.addData(input);
        qrcode.make();

        var output = '',
            border = repeat(white).times(qrcode.getModuleCount() + 3)  + '\n';

        output += border;
        qrcode.modules.forEach(function (row) {
            output += white;
            output += row.map(toCell).join(''); 
            output += white + '\n';
        });
        output += border;

        if (cb) cb(output);
        else console.log(output);
    }
};
{'fraction_non_alphanumeric': 0.15366651097617937, 'fraction_numerical': 0.0018682858477347033, 'mean_word_length': 1.8636363636363635, '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': '5949851', 'n_tokens_mistral': 658, 'n_tokens_neox': 613, 'n_words': 130}