<commit_before>import http from 'http';

let pkgUrl = {
  host: 'npmcdn.com',
  path: '/video.js@latest/package.json'
};

function getPackage(cb) {
  const defaults = {
    version: "5.8.8",
    dependencies: {
      "videojs-ie8": "1.1.2"
    }
  };

  http.get({host: pkgUrl.host, path: pkgUrl.path, withCredentials: false}, function(res) {
    var body = '';
    res.on('data', function(d) {
      body += d;
    });

    res.on('end', function(e) {
      try {
        body = JSON.parse(body);
      } catch (e) {
        body = defaults;
      }
      cb(null, body);
    });<commit_msg>defaults can be file global<commit_after>import http from 'http';

let pkgUrl = {
  host: 'npmcdn.com',
  path: '/video.js@latest/package.json'
};

const defaults = {
  version: "5.8.8",
  dependencies: {
    "videojs-ie8": "1.1.2"
  }
};


function getPackage(cb) {
  http.get({host: pkgUrl.host, path: pkgUrl.path, withCredentials: false}, function(res) {
    var body = '';
    res.on('data', function(d) {
      body += d;
    });

    res.on('end', function(e) {
      try {
        body = JSON.parse(body);
      } catch (e) {
        body = defaults;
      }
      cb(null, body);
    });
{'fraction_non_alphanumeric': 0.18197135636057288, 'fraction_numerical': 0.011794439764111205, 'mean_word_length': 2.375, 'pattern_counts': {'":': 2, '<': 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': '327247', 'n_tokens_mistral': 446, 'n_tokens_neox': 433, 'n_words': 90}