<commit_before>
/**
 * Module dependencies
 */

var WPCOM = require('../');

/**
 * Detect client/server side
 */

var is_client_side = 'undefined' !== typeof window;

/**
 * Testing data
 */

var fixture = require('./fixture');

module.exports = {
  wpcom: wpcom,
  wpcom_public: function() { return WPCOM(); }
};

function wpcom() {
  if (is_client_side) {
    var proxy = require('../node_modules/wpcom-proxy-request');
    var _wpcom = WPCOM(proxy);

    _wpcom.request({
      metaAPI: { accessAllUsersBlogs: true }
    }, function(err) {
      if (err) throw err;
      console.log('proxy now running in "access all user\'s blogs" mode');
    });

    return _wpcom;
  } else {
    // get token from environment var
    var token = process.env.TOKEN || require('./token').value;
    return WPCOM(token);
  }
}<commit_msg>test: add util.site() method<commit_after>
/**
 * Module dependencies
 */

var WPCOM = require('../');
var config = require('./config');

/**
 * Detect client/server side
 */

var is_client_side = 'undefined' !== typeof window;

/**
 * Config vars
 */

var token = process.env.TOKEN || config.token;
var site = process.env.SITE || config.site;

/**
 * Testing data
 */

var fixture = require('./fixture');

module.exports = {
  wpcom: wpcom,
  wpcom_public: function() { return WPCOM(); },
  util: function () { return config.site; }
};

function wpcom() {
  if (is_client_side) {
    var proxy = require('../node_modules/wpcom-proxy-request');
    var _wpcom = WPCOM(proxy);

    _wpcom.request({
      metaAPI: { accessAllUsersBlogs: true }
    }, function(err) {
      if (err) throw err;
      console.log('proxy now running in "access all user\'s blogs" mode');
    });

    return _wpcom;
  } else {
    return WPCOM(token);
  }
}
{'fraction_non_alphanumeric': 0.16619398752127057, 'fraction_numerical': 0.0, 'mean_word_length': 3.0, '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': '1399687', 'n_tokens_mistral': 581, 'n_tokens_neox': 583, 'n_words': 147}