<commit_before>var optionMixin = {

  props: ['option', 'name', 'value'],

  data: function() {
    return  {
      data: this.option.options.data // default value
    }
  },

  /**
   * Update the selected value on component creation
   */
  created: function() {
    if (typeof this.value !== 'undefined') {
      this.data = this.value;
    }
  },

  methods: {

    /**
     * Update an option value for the raw
     *
     * @param value
     */
    updateOption: function(value) {<commit_msg>Update the option value on option change and stringify it if it is not a string<commit_after>var optionMixin = {

  props: ['option', 'name', 'value'],

  data: function() {
    return  {
      data: this.option.options.data // default value
    }
  },

  /**
   * Update the value on component creation
   */
  created: function() {
    if (typeof this.value !== 'undefined') {
      if (typeof this.value !== 'string') {
        this.data = JSON.stringify(this.value);
      } else {
        this.data = this.value;
      }
    }
  },

  /**
   * Update the value on component update
   */
  watch: {
    value: {
      handler: function(value) {
        if (typeof value !== 'string') {
          this.data = JSON.stringify(value);
        } else {
          this.data = value;
        }
      }
    }
  },

  methods: {

    /**
     * Update an option value for the raw
     *
     * @param value
     */
    updateOption: function(value) {
{'fraction_non_alphanumeric': 0.1392931392931393, 'fraction_numerical': 0.0, 'mean_word_length': 1.952965235173824, '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': '663188', 'n_tokens_mistral': 446, 'n_tokens_neox': 434, 'n_words': 120}