<commit_before>var _ = require('underscore');

var PLUGIN_CONFIG = {
  classList: [{ src: 'lib/js/classList.js' }],
  markdown:  [{ src: 'plugin/markdown/marked.js'},
	      { src: 'plugin/markdown/markdown.js'}],
  highlight: [{ src: 'plugin/highlight/highlight.js',
		async: true, callback: function() { 
		  hljs.initHighlightingOnLoad(); 
		}}],
  zoom:      [{ src: 'plugin/zoom-js/zoom.js', async: true}],
  notes:     [{ src: 'plugin/notes/notes.js', async: true}],
  remotes:   [{ src: 'plugin/remotes/remotes.js'}],
  math:      [{ src: 'plugin/math/math.js', async: true }]
};

function Config (overrides) {
  var defaults = {
    title: '',
    description: '',
    author: '',
    options: {
      theme: 'default',
      transition: 'default'
    },
    plugins: ['markdown', 'notes']
  };
  for (var item in defaults) {
    if (item in overrides) {
      this[item] = overrides[item];
    }
    else {
      this[item] = defaults[item];
    }
  }
}

Config.prototype = {
  constructor: Config,

  has_plugin: function (name) {
    return _.contains(this.plugins, name);
  },
  get_dependencies: function () {
    return _.flatten(_.map(this.plugins, function (p) {
      return PLUGIN_CONFIG[p];
    }), true);
  },
  get_files_for_dependencies: function () {
    return _.map(this.get_dependencies(), function (d) { return d.src });
  }
};

module.exports = Config;
<commit_msg>Add some more defaults<commit_after>var _ = require('underscore');

var PLUGIN_CONFIG = {
  classList: [{ src: 'lib/js/classList.js' }],
  markdown:  [{ src: 'plugin/markdown/marked.js'},
	      { src: 'plugin/markdown/markdown.js'}],
  highlight: [{ src: 'plugin/highlight/highlight.js',
		async: true, callback: function() { 
		  hljs.initHighlightingOnLoad(); 
		}}],
  zoom:      [{ src: 'plugin/zoom-js/zoom.js', async: true}],
  notes:     [{ src: 'plugin/notes/notes.js', async: true}],
  remotes:   [{ src: 'plugin/remotes/remotes.js'}],
  math:      [{ src: 'plugin/math/math.js', async: true }]
};

function Config (overrides) {
  var defaults = {
    title: '',
    description: '',
    author: '',
    options: {
      theme: 'default',
      transition: 'default',
      controls: true,
      progress: true,
      history: true,
      center: true
    },
    plugins: ['markdown', 'notes']
  };
  for (var item in defaults) {
    if (item in overrides) {
      this[item] = overrides[item];
    }
    else {
      this[item] = defaults[item];
    }
  }
}

Config.prototype = {
  constructor: Config,

  has_plugin: function (name) {
    return _.contains(this.plugins, name);
  },
  get_dependencies: function () {
    return _.flatten(_.map(this.plugins, function (p) {
      return PLUGIN_CONFIG[p];
    }), true);
  },
  get_files_for_dependencies: function () {
    return _.map(this.get_dependencies(), function (d) { return d.src });
  }
};

module.exports = Config;

{'fraction_non_alphanumeric': 0.175, 'fraction_numerical': 0.0, 'mean_word_length': 2.979281767955801, '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': '6460299', 'n_tokens_mistral': 1007, 'n_tokens_neox': 966, 'n_words': 203}