<commit_before>var Gry = require("gry")
  , IsThere = require("is-there")
  ;

function CdnJsAdder (options, callback) {

}

CdnJsAdder.prototype.add = function (lib) {

};<commit_msg>Added the add method.<commit_after>// Dependencies
var Gry = require("gry")
  , IsThere = require("is-there")
  , Ul = require("ul")
  ;

// Constants
const PATH_LIBS = "/ajax/libs/";

function CdnJsAdder (options, callback) {
    if (this.constructor !== CdnJsAdder) {
        return new CdnJsAdder(options, callback);
    }

    options = Ul.merge(options, {
        libs: []
    });

    var self = this;
    IsThere(options.cdnjs + PATH_LIBS, function (exists) {
        if (!exists) {
            return callback(new Error("The cdnjs library directory doesn't exist."));
        }

        var res = {
                err: []
              , data: []
            }
          , c = 0
          , handler = function (lib, i) {
                self.add(lib, function (err, data) {
                    res.err[i] = err;
                    res.data[i] = data;
                    if (++c === options.libs.length) {
                        if (res.err.length) {
                            callback(res);
                        }
                    }
                });
            }
        ;


        options.libs.forEach(function (cLib, i) {
            handler(cLib, i);
        });
    });
}

CdnJsAdder.prototype.add = function (lib, callback) {
    callback(null, null);
};

module.exports = CdnJsAdder;
{'fraction_non_alphanumeric': 0.13818424566088117, 'fraction_numerical': 0.0006675567423230974, 'mean_word_length': 1.5493197278911566, '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': '447432', 'n_tokens_mistral': 477, 'n_tokens_neox': 452, 'n_words': 96}