<commit_before>import global from './metal/global';
import isNodeLikeEnvironment from './metal/is-node-like-environment';

const fetch = global.fetch;

if (!fetch && isNodeLikeEnvironment()) {
  global.fetch = global.require('node-fetch');
  global.Response = global.fetch.Response;
}<commit_msg>Updated isomorphic-fetch's use of global.require because it breaks in node env (#164)<commit_after>/* globals require */

import global from './metal/global';
import isNodeLikeEnvironment from './metal/is-node-like-environment';

const fetch = global.fetch;

if (!fetch && isNodeLikeEnvironment()) {
  /* this indirection is needed because babel throws errors when
   * transpiling require('node-fetch') using `amd` plugin with babel6
   */
  const localRequire = require;

  global.fetch = localRequire('node-fetch');
  global.Response = global.fetch.Response;
}
{'fraction_non_alphanumeric': 0.12922002328288706, 'fraction_numerical': 0.004656577415599534, 'mean_word_length': 4.850340136054422, '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': '7185799', 'n_tokens_mistral': 247, 'n_tokens_neox': 234, 'n_words': 69}