<commit_before>var nano = require('nano')('http://localhost:5984');

var loader = function (loader, done) {
    console.log('loading components');

    var db = nano.use('signage');

    console.log('registerComponent: %s', typeof(loader.registerComponent) === 'function');

    db.view('signage', 'components', function (err, res) {
        if (!err) {
            res.rows.forEach(function (doc) {
                console.log(doc);
            });
        } else {
            done(err);
        }
    });

    console.log('registerGraph: %s', typeof(loader.registerGraph) === 'function');

    db.view('signage', 'graphs', function (err, res) {
        if (!err) {
            res.rows.forEach(function (doc) {
                loader.registerGraph(doc.id, doc.json);
                console.log(doc);
            });
        } else {
            done(err);
        }
    });

    done(null);
};

module.exports = loader;<commit_msg>changed some ting<commit_after>var nano = require('nano')('http://localhost:5984');

var loader = function (loader, done) {
    console.log('loading components');

    var db = nano.use('signage');

    console.log('registerComponent: %s', typeof(loader.registerComponent) === 'function');

    db.view('signage', 'components', function (err, res) {
        if (!err) {
            res.rows.forEach(function (doc) {
                console.log(doc);
            });
        } else {
            done(err);
        }
    });

    console.log('registerGraph: %s', typeof(loader.registerGraph) === 'function');

    db.view('signage', 'graphs', function (err, res) {
        if (!err) {
            res.rows.forEach(function (doc) {
                loader.registerGraph('signage', doc.id, doc.json);
                console.log(doc);
            });
        } else {
            done(err);
        }
    });

    done(null);
};

module.exports = loader;
{'fraction_non_alphanumeric': 0.1713527851458886, 'fraction_numerical': 0.004244031830238726, 'mean_word_length': 2.0716612377850163, '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': '3251735', 'n_tokens_mistral': 571, 'n_tokens_neox': 540, 'n_words': 102}