<commit_before>var Reaction = require("../reaction")
  , rules = require("../rules")
  , path = require("path")
  , Backbone = require("backbone")
  , _ = require("underscore");

var ModelReaction = Reaction.extend({

  init: function(next, reload) {
    var newModel = this.get(this.modelName);
    if(!(newModel instanceof Backbone.Model || newModel instanceof Backbone.Collection ||
          this.isEndDashCompatible(newModel))) {
      newModel = new Backbone.Model(newModel || {});
    }

    this.el.data("model", newModel);
    this.stack.push(newModel);
    next(reload);
  },

  isEndDashCompatible: function(model) {
    if (!model) {
      return false;
    }
    return (typeof model.on == 'function' &&
            typeof model.once == 'function' &&
            typeof model.set == 'function' &&
            typeof model.get == 'function'<commit_msg>Don't forget the semi colon!<commit_after>var Reaction = require("../reaction")
  , rules = require("../rules")
  , path = require("path")
  , Backbone = require("backbone")
  , _ = require("underscore");

var ModelReaction = Reaction.extend({

  init: function(next, reload) {
    var newModel = this.get(this.modelName);
    if(!(newModel instanceof Backbone.Model || newModel instanceof Backbone.Collection ||
          this.isEndDashCompatible(newModel))) {
      newModel = new Backbone.Model(newModel || {});
    }

    this.el.data("model", newModel);
    this.stack.push(newModel);
    next(reload);
  },

  isEndDashCompatible: function(model) {
    if (!model) {
      return false;
    };
    return (typeof model.on == 'function' &&
            typeof model.once == 'function' &&
            typeof model.set == 'function' &&
            typeof model.get == 'function'
{'fraction_non_alphanumeric': 0.15538990825688073, 'fraction_numerical': 0.0, 'mean_word_length': 3.0114942528735633, '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': '1035113', 'n_tokens_mistral': 534, 'n_tokens_neox': 516, 'n_words': 107}