<commit_before>import * as _ from 'underscore';
import * as Backbone from 'backbone';

class BaseView extends Backbone.View {

  constructor() {
    super();
    this._subviews = null;
  }

  registerSubView(view) {
    this._subviews = this._subviews || [];
    this._subviews.push(view);
  }

  remove() {
    _.invoke(this._subviews, 'remove');
    Backbone.View.prototype.remove.call(this);
  }

}

export default BaseView;<commit_msg>Pass options to constructor through BaseView if any<commit_after>import * as _ from 'underscore';
import * as Backbone from 'backbone';

class BaseView extends Backbone.View {

  constructor(options = {}) {
    super(options);
    this._subviews = null;
  }

  registerSubView(view) {
    this._subviews = this._subviews || [];
    this._subviews.push(view);
  }

  remove() {
    _.invoke(this._subviews, 'remove');
    Backbone.View.prototype.remove.call(this);
  }

}

export default BaseView;
{'fraction_non_alphanumeric': 0.13368983957219252, 'fraction_numerical': 0.0, 'mean_word_length': 3.633663366336634, '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': '4410083', 'n_tokens_mistral': 306, 'n_tokens_neox': 297, 'n_words': 62}