<commit_before>export default function () {
  return {
    init: function () {
      this.autoresize = e => {
        e.target.style.height = '1px'
        e.target.style.height = (e.target.scrollHeight) + 'px'
      }
      this.on('mount', function () { 
        let autoresizers = this.root.querySelectorAll('textarea[autoresize]')

        autoresizers.forEach(e => {
          e.style.height = (e.scrollHeight) + 'px'
          e.addEventListener('input', this.autoresize)
        })
      })
    }
  }<commit_msg>Added on.('update', ...) to autoresize<commit_after>export default function () {
  return {
    init: function () {
      this.autoresize = e => {
        e.target.style.height = '1px'
        e.target.style.height = (e.target.scrollHeight) + 'px'
      }
      this.select = () => {
        let autoresizers = this.root.querySelectorAll('textarea[autoresize]')

        autoresizers.forEach(x => {
          x.style.height = (x.scrollHeight) + 'px'
          x.addEventListener('input', this.autoresize)
        })
      }
      this.on('mount', function () { 
        this.select()
      })
      this.on('update', function () { 
        this.select()
      })
    }
  }
{'fraction_non_alphanumeric': 0.15869017632241814, 'fraction_numerical': 0.0016792611251049538, 'mean_word_length': 2.0485933503836318, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '150572', 'n_tokens_mistral': 379, 'n_tokens_neox': 371, 'n_words': 56}