<commit_before><template lang="jade">

span {{updateInfo}}

</template>

<script>
import ms from 'pretty-ms';

export default {
  data() {
    return {
      updateInfo: 'aktualizowanie',
    };
  },

  ready() {
    this.$parent.$parent.api.basic
      .on('nextUpdate', time => this.nextUpdate(time));
  },

  methods: {
    nextUpdate(time) {
      if (time) {
        this.thread ? clearTimeout(this.thread) : null;

        this.thread = setInterval(_ => this.parse(--time), 1000);
      }

      return time;
    },

    parse(time) {
      if (time == 260) {
        this.updateInfo = `aktualizacja za 4:20`;
        return time;
      }

      this.updateInfo = time > 0
        ? `aktualizacja za ${ ms(time * 1000) }`
        : `aktualizowanie w trakcie ${time ? `(${ms(-time * 1000)})` : ''}`;
    },
  },<commit_msg>fix cleaning after parsing next update time<commit_after><template lang="jade">

span {{updateInfo}}

</template>

<script>
import ms from 'pretty-ms';

export default {
  data() {
    return {
      updateInfo: 'aktualizowanie',
    };
  },

  ready() {
    this.$parent.$parent.api.basic
      .on('nextUpdate', time => this.nextUpdate(time));
  },

  methods: {
    nextUpdate(time) {
      if (time) {
        this.thread ? clearInterval(this.thread) : null;

        this.thread = setInterval(_ => this.parse(--time), 1000);
      }

      return time;
    },

    parse(time) {
      if (time == 260) {
        this.updateInfo = `aktualizacja za 4:20`;
        return time;
      }

      this.updateInfo = time > 0
        ? `aktualizacja za ${ ms(time * 1000) }`
        : `aktualizowanie w trakcie ${time ? `(${ms(-time * 1000)})` : ''}`;
    },
  },
{'fraction_non_alphanumeric': 0.16953171310017784, 'fraction_numerical': 0.022525192649673977, 'mean_word_length': 2.2776699029126215, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '3630862', 'n_tokens_mistral': 620, 'n_tokens_neox': 572, 'n_words': 120}