<commit_before>if (typeof define !== 'function') { var define = require('amdefine')(module); }
define(['nbd/View'], function(View) {
  "use strict";

  var constructor = View.extend({

    init : function( model ) {
      if (typeof model === 'object') {
        this._model = this.Model = model;
      }

      this.id = (model && model.id) || function() {
        return model;
      };
    },

    destroy : function() {
      this._model.off(null, null, this);
      this._model = this.Model = null;
      this._super();
    },
    
    // all data needed to template the view
    templateData : function() {
      return (this._model && this._model.data) ? this._model.data() : this.id();<commit_msg>Entity View: adding persist flag to destroy()<commit_after>if (typeof define !== 'function') { var define = require('amdefine')(module); }
define(['nbd/View'], function(View) {
  "use strict";

  var constructor = View.extend({

    init : function( model ) {
      if (typeof model === 'object') {
        this._model = this.Model = model;
      }

      this.id = (model && model.id) || function() {
        return model;
      };
    },

    destroy : function(persist) {
      this._model.off(null, null, this);
      if (!persist) {
        this._model = this.Model = null;
      }
      this._super();
    },
    
    // all data needed to template the view
    templateData : function() {
      return (this._model && this._model.data) ? this._model.data() : this.id();
{'fraction_non_alphanumeric': 0.16340310600945307, 'fraction_numerical': 0.0, 'mean_word_length': 2.4385150812064964, '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': '710898', 'n_tokens_mistral': 448, 'n_tokens_neox': 438, 'n_words': 113}