<commit_before>// Load in our dependencies
// DEV: We use `require`/`assert` instead of `peerDependencies` to make floating dependencies easier
var electronPrebuilt;
try {
  electronPrebuilt = require('electron-prebuilt');
} catch (err) {
  console.error('Expected `electron-prebuilt` to be installed but it was not. Please install it.');
  throw err;
}

// DEV: This is a trimmed down version of https://github.com/karma-runner/karma-chrome-launcher/blob/v0.2.2/index.js
//   which is MIT licensed https://github.com/karma-runner/karma-chrome-launcher/blob/v0.2.2/LICENSE
function ElectronBrowser(baseBrowserDecorator, args) {
  // Apply browser decorations to ourself
  baseBrowserDecorator(this);

  // Extract arguments
  var flags = args.flags || [];
  var userDataDir = args.chromeDataDir || this._tempDir;

  // Set up our options to use a custom user data directory to prevent crossover in tests
  // TODO: Test that user dir is isolated
  this._getOptions = function (url) {
    return [
      '--user-data-dir=' + userDataDir,
      '--url=' + url
    ].concat(flags, __dirname + '/electron-launcher.js');
  };
}
ElectronBrowser.prototype = {
  name: 'Electron',
  DEFAULT_CMD: {
    linux: electronPrebuilt,
    darwin: electronPrebuilt,
    // TODO: Verify that `electronPrebuilt` will work as expected
    win32: electronPrebuilt
  },
  ENV_CMD: 'ELECTRON_BIN'
};
ElectronBrowser.$inject = ['baseBrowserDecorator', 'args'];

module.exports = {
  'launcher:Electron': ['type', ElectronBrowser]
};
<commit_msg>Cleaned up a completed TODO<commit_after>// Load in our dependencies
// DEV: We use `require`/`assert` instead of `peerDependencies` to make floating dependencies easier
var electronPrebuilt;
try {
  electronPrebuilt = require('electron-prebuilt');
} catch (err) {
  console.error('Expected `electron-prebuilt` to be installed but it was not. Please install it.');
  throw err;
}

// DEV: This is a trimmed down version of https://github.com/karma-runner/karma-chrome-launcher/blob/v0.2.2/index.js
//   which is MIT licensed https://github.com/karma-runner/karma-chrome-launcher/blob/v0.2.2/LICENSE
function ElectronBrowser(baseBrowserDecorator, args) {
  // Apply browser decorations to ourself
  baseBrowserDecorator(this);

  // Extract arguments
  var flags = args.flags || [];
  var userDataDir = args.chromeDataDir || this._tempDir;

  // Set up our options to use a custom user data directory to prevent crossover in tests
  // TODO: Test that user dir is isolated
  this._getOptions = function (url) {
    return [
      '--user-data-dir=' + userDataDir,
      '--url=' + url
    ].concat(flags, __dirname + '/electron-launcher.js');
  };
}
ElectronBrowser.prototype = {
  name: 'Electron',
  DEFAULT_CMD: {
    linux: electronPrebuilt,
    darwin: electronPrebuilt,
    win32: electronPrebuilt
  },
  ENV_CMD: 'ELECTRON_BIN'
};
ElectronBrowser.$inject = ['baseBrowserDecorator', 'args'];

module.exports = {
  'launcher:Electron': ['type', ElectronBrowser]
};

{'fraction_non_alphanumeric': 0.12608695652173912, 'fraction_numerical': 0.005351170568561873, 'mean_word_length': 3.8872549019607843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '1530661', 'n_tokens_mistral': 965, 'n_tokens_neox': 910, 'n_words': 258}