<commit_before>var react = require('react')
  , utils = require('./utils')
  , observables = require('./observables')
  , coordinator = require('./coordinator')
  , instrumentation = require('./instrumentation')
  , pelletReactMixin = require('./pellet-react-mixin');

/**
 * @class pellet
 *
 */
function pellet(config) {
  this.readyFnQue = [];
  this.initFnQue = [];
  this.coordinators = {};
  this.coordinatorSpecs = {};
  this.components = {};
  this.locales = {};

  this.middlewareStack = [];

  if(config) {
    // now update the config
    config = Object.create(config);

    if (config.instrumentation) {
      this.instrumentation = config.instrumentation;
      config.instrumentation = void(0);
    } else {
      this.instrumentation = new instrumentation();
    }

    if (config.logger) {
      this.logger = config.logger;
      config.logger = void(0);
    } else {
      this.logger = null; // TODO: make a mock logger
    }

    this.config = config;
  } else {
    this.config = {};
  }
}

/**
 *
 * @type {observables}
 */
pellet.prototype.observables = observables;

/**
 *
 * @type {exports}
 */
pellet.prototype.createClass = function(spec) {
  if(!spec.mixins) {
    spec.mixins = [];
  }

  if(!(pelletReactMixin in spec.mixins)) {
    spec.mixins.push(pelletReactMixin);
  }

  if(spec.componentConstruction) {
    var _componentConstruction = spec.componentConstruction;
    delete spec.componentConstruction;
  }
<commit_msg>fix: when pellet inits with out config we need default that will not crash pellet<commit_after>var react = require('react')
  , utils = require('./utils')
  , observables = require('./observables')
  , coordinator = require('./coordinator')
  , instrumentation = require('./instrumentation')
  , pelletReactMixin = require('./pellet-react-mixin');

/**
 * @class pellet
 *
 */
function pellet(config) {
  this.readyFnQue = [];
  this.initFnQue = [];
  this.coordinators = {};
  this.coordinatorSpecs = {};
  this.components = {};
  this.locales = {};

  this.middlewareStack = [];

  if(config) {
    // now update the config
    config = Object.create(config);

    if (config.instrumentation) {
      this.instrumentation = config.instrumentation;
      config.instrumentation = void(0);
    } else {
      this.instrumentation = new instrumentation();
    }

    if (config.logger) {
      this.logger = config.logger;
      config.logger = void(0);
    } else {
      this.logger = null; // TODO: make a mock logger
    }

    this.config = config;
  } else {
    this.config = {
      instrumentation: new instrumentation(),
      logger: null
    };
  }
}

/**
 *
 * @type {observables}
 */
pellet.prototype.observables = observables;

/**
 *
 * @type {exports}
 */
pellet.prototype.createClass = function(spec) {
  if(!spec.mixins) {
    spec.mixins = [];
  }

  if(!(pelletReactMixin in spec.mixins)) {
    spec.mixins.push(pelletReactMixin);
  }

  if(spec.componentConstruction) {
    var _componentConstruction = spec.componentConstruction;
    delete spec.componentConstruction;
  }

{'fraction_non_alphanumeric': 0.15006553079947577, 'fraction_numerical': 0.001310615989515072, 'mean_word_length': 3.0223978919631094, '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': '2826951', 'n_tokens_mistral': 982, 'n_tokens_neox': 949, 'n_words': 177}