<commit_before>
/**

  Globals.js

  There are multiple globals we choose not to pass between functions:

  • config    Configuration Object
  • db        Database (via LowDB)
  • fs        File System (via MemoryFS)
  • server    Server (via BrowserSync)

**/

var dataStore = require("./data-store");


module.exports = function(options) {

  // Configuration
  global.config = require("./config")();

  // Database: dataStore appends to global database. As a result, assigning
  // global.db with each iteration isn't data lossy.
  (global.config.data || []).forEach(function(options) {
    global.db = dataStore(options);
  });

  // File system
  global.fs = new (require("memory-fs"))();

  // Server
  global.server = require("browser-sync").create();

  // Engines
  global.engines = require("superloader").engines;
  global.engines.dir = process.cwd();

  // Add internal port (proxy of BrowserSync)
  global.ports = { proxy : 27182 };

  // Add engines in config
  for (var ext in global.config.pipelines)
    global.engines.addEngine(ext, global.config.pipelines[ext]);

};<commit_msg>globals: renames data options (to avoid conflict with options)<commit_after>
/**

  Globals.js

  There are multiple globals we choose not to pass between functions:

  • config    Configuration Object
  • db        Database (via LowDB)
  • fs        File System (via MemoryFS)
  • server    Server (via BrowserSync)

**/

var dataStore = require("./data-store");


module.exports = function(options) {

  // Configuration
  global.config = require("./config")();

  // Database: dataStore appends to global database. As a result, assigning
  // global.db with each iteration isn't data lossy.
  (global.config.data || []).forEach(function(store) {
    global.db = dataStore(store);
  });

  // File system
  global.fs = new (require("memory-fs"))();

  // Server
  global.server = require("browser-sync").create();

  // Engines
  global.engines = require("superloader").engines;
  global.engines.dir = process.cwd();

  // Add internal port (proxy of BrowserSync)
  global.ports = { proxy : 27182 };

  // Add engines in config
  for (var ext in global.config.pipelines)
    global.engines.addEngine(ext, global.config.pipelines[ext]);

};
{'fraction_non_alphanumeric': 0.13634331694233348, 'fraction_numerical': 0.004470272686633884, 'mean_word_length': 3.23062381852552, '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': '870617', 'n_tokens_mistral': 700, 'n_tokens_neox': 658, 'n_words': 198}