{"size": 582, "ext": "js", "max_stars_repo_path": "node_modules/pm2/node_modules/axm/probe/transaction.js", "max_stars_repo_name": "Caesar73/nc", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "node_modules/pm2/node_modules/axm/probe/transaction.js", "max_issues_repo_name": "Caesar73/nc", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "node_modules/pm2/node_modules/axm/probe/transaction.js", "max_forks_repo_name": "Caesar73/nc", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.25, "max_line_length": 56, "alphanum_fraction": 0.5498281787}

var Proxy     = require('proxy.js');
var RedisWrap = require('./wrapper/redis.js');
var HttpWrap  = require('./wrapper/http.js');

var AXM = module.exports = {
  patch : function() {
    var Module = require('module');

    Proxy.wrap(Module, '_load', function(load) {
      return function(file) {
        if (file == 'redis') {
          return RedisWrap(load.apply(this, arguments));
        }
        else if (file == 'http') {
          return HttpWrap(load.apply(this, arguments));
        }
        else
          return load.apply(this, arguments);
      };
    });
  }
};
