<commit_before>import { View } from '../../core';
import Template from './button.hbs';
import { Model } from 'backbone';

export default View.extend({
  tagName: 'a',
  template: Template,
  attributes: {
    href: '#',
  },

  constructor(args) {
    const defaults = {...args.defaults};
    this.model = new Model(defaults);

    const modifier = this.model.get('modifier');
    const blockName = 'plantingjs-component-button';
    const classes = [`${blockName}`];

    if (modifier) {
      classes.push(`${blockName}-${modifier}`);
    }

    this.className = classes.join(' ');
    View.call(this, args);

    window.ButtonTest = this;
  },

  initialize() {
    this.model.on('change', this.render, this);
    this.render();
  },

  render() {
    const view = this.template(this.model.toJSON());
    this.$el<commit_msg>Remove global variable<commit_after>import { View } from '../../core';
import Template from './button.hbs';
import { Model } from 'backbone';

export default View.extend({
  tagName: 'a',
  template: Template,
  attributes: {
    href: '#',
  },

  constructor(args) {
    const defaults = {...args.defaults};
    this.model = new Model(defaults);

    const modifier = this.model.get('modifier');
    const blockName = 'plantingjs-component-button';
    const classes = [`${blockName}`];

    if (modifier) {
      classes.push(`${blockName}-${modifier}`);
    }

    this.className = classes.join(' ');
    View.call(this, args);
  },

  initialize() {
    this.model.on('change', this.render, this);
    this.render();
  },

  render() {
    const view = this.template(this.model.toJSON());
    this.$el
{'fraction_non_alphanumeric': 0.1817625458996328, 'fraction_numerical': 0.0, 'mean_word_length': 3.0875, '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': '3083735', 'n_tokens_mistral': 523, 'n_tokens_neox': 513, 'n_words': 111}