<commit_before>(function(global, Lyria) {
  
Lyria.Entity = (function() {
  var functionList;

  functionList = {};

  function Entity(name) {
    this.name = name != null ? name : this.constructor.name;
    this.components = {};
    functionList = {};
  }

  Entity.prototype.add = function(component) {
    var componentInstance, componentName, key, value;
    if (!component) {
      return this;
    }
    componentName = component.name;
    componentInstance = this.components[componentName];
    if (!componentInstance) {
      componentInstance = component;
      if (typeof componentInstance.register === "function") {
        componentInstance.register();
      }
      for (key in componentInstance) {
        value = componentInstance[key];
        if (key === 'constructor') {
          continue;
        }
        if (typeof value === 'function') {
          if (!functionList[key]) {
            functionList[key] = [];
          }
          functionList[key].push(value);
          if (!this[key]) {
            this[key] = (function(key) {
              return function() {
                var functions, _i, _len, _ref;
                _ref = functionList[key];
                for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                  functions = _ref[_i];
                  functions.apply(this, arguments);
                }
                return this;
              };
            })(key);
          }
        }
      }
    }
    return this;
  };

  Entity.prototype.remove = function(componentName) {
    var _base;
    if (this.components[componentName]) {
      if (typeof (_base = this.components[componentName]).unregister === "function") {
        _base.unregister();
      }
      delete this.components[componentName];
    }
    return this;
  };

  Entity.prototype.render = function() {
    var key, value, _ref;
    _ref = this.components;
    for (key in _ref) {
      value = _ref[key];
      if (typeof value.render === "function") {
        value.render();
      }
    }
    return this;
  };

  Entity.prototype.update = function(dt) {
    var key, value, _ref;
    _ref = this.components;
    for (key in _ref) {
      value = _ref[key];
      if (typeof value.update === "function") {
        value.update(dt);
      }
    }
    return this;
  };

  return Entity;

})();  
  
})(this, this.Lyria = this.Lyria || {});<commit_msg>Updated intendation<commit_after>(function(global, Lyria) {
  
  Lyria.Entity = (function() {
    var functionList;
  
    functionList = {};
  
    function Entity(name) {
      this.name = name != null ? name : this.constructor.name;
      this.components = {};
      functionList = {};
    }
  
    Entity.prototype.add = function(component) {
      var componentInstance, componentName, key, value;
      if (!component) {
        return this;
      }
      componentName = component.name;
      componentInstance = this.components[componentName];
      if (!componentInstance) {
        componentInstance = component;
        if (typeof componentInstance.register === "function") {
          componentInstance.register();
        }
        for (key in componentInstance) {
          value = componentInstance[key];
          if (key === 'constructor') {
            continue;
          }
          if (typeof value === 'function') {
            if (!functionList[key]) {
              functionList[key] = [];
            }
            functionList[key].push(value);
            if (!this[key]) {
              this[key] = (function(key) {
                return function() {
                  var functions, _i, _len, _ref;
                  _ref = functionList[key];
                  for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                    functions = _ref[_i];
                    functions.apply(this, arguments);
                  }
                  return this;
                };
              })(key);
            }
          }
        }
      }
      return this;
    };
  
    Entity.prototype.remove = function(componentName) {
      var _base;
      if (this.components[componentName]) {
        if (typeof (_base = this.components[componentName]).unregister === "function") {
          _base.unregister();
        }
        delete this.components[componentName];
      }
      return this;
    };
  
    Entity.prototype.render = function() {
      var key, value, _ref;
      _ref = this.components;
      for (key in _ref) {
        value = _ref[key];
        if (typeof value.render === "function") {
          value.render();
        }
      }
      return this;
    };
  
    Entity.prototype.update = function(dt) {
      var key, value, _ref;
      _ref = this.components;
      for (key in _ref) {
        value = _ref[key];
        if (typeof value.update === "function") {
          value.update(dt);
        }
      }
      return this;
    };
  
    return Entity;
  
  })();  
  
})(this, this.Lyria = this.Lyria || {});
{'fraction_non_alphanumeric': 0.13090909090909092, 'fraction_numerical': 0.00040404040404040404, 'mean_word_length': 1.7353591160220994, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3348314', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1377, 'n_words': 303}