<commit_before>'use strict';

var _ = require('lodash');
var WebLink = require('./web_link');

var Root = function(url, http, extensions) {
  _.forEach(extensions, function(e) {
    if (!e.initialize) {
      return;
    }

    e.initialize(http, extensions);
  });
  var link = new WebLink({ href: url }, http, extensions);

  this.follow = function(options) {
    return link.follow(options);
  };
};
<commit_msg>Return WebLink directly from Root constructor.<commit_after>'use strict';

var _ = require('lodash');
var WebLink = require('./web_link');

var Root = function(url, http, extensions) {
  _.forEach(extensions, function(e) {
    if (!e.initialize) {
      return;
    }

    e.initialize(http, extensions);
  });
  return new WebLink({ href: url }, http, extensions);
};

{'fraction_non_alphanumeric': 0.16198979591836735, 'fraction_numerical': 0.0, 'mean_word_length': 3.757575757575758, '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': '2698206', 'n_tokens_mistral': 247, 'n_tokens_neox': 241, 'n_words': 62}