<commit_before>var QRCode = require('./../vendor/QRCode'),
    QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'),
    black = "  ",
    white = "\033[47m  \033[0m",
    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);

        output += border + '\n';
        qrcode.modules.forEach(function (row) {
            output += white;
            output += row.map(toCell).join(''); 
            output += white + '\n';
        });<commit_msg>Make the black actually use black ascii BG colors.<commit_after>var QRCode = require('./../vendor/QRCode'),
    QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'),
    black = "\033[40m  \033[0m",
    white = "\033[47m  \033[0m",
    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);

        output += border + '\n';
        qrcode.modules.forEach(function (row) {
            output += white;
            output += row.map(toCell).join(''); 
            output += white + '\n';
        });
{'fraction_non_alphanumeric': 0.15372507869884575, 'fraction_numerical': 0.01626442812172088, 'mean_word_length': 1.8981762917933132, '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': '5722075', 'n_tokens_mistral': 612, 'n_tokens_neox': 556, 'n_words': 120}