<commit_before>// import autoscroll from './directives/autoscroll';

export const autoscroll = {
  scroll: function (el, value) {
    // Suported value
    var autoPositions = [
      'top',
      'right',
      'bottom',
      'left',
      'top left',
      'top right',
      'bottom left',
      'bottom right',
      'middle'
    ]

    if (autoPositions.includes(value)) {
      if (value === 'top') {
        el.scrollTop = 0
      } else if (value === 'right') {
        el.scrollLeft = el.scrollWidth - el.clientWidth
      } else if (value === 'bottom') {
        el.scrollTop = el.scrollHeight - el.clientHeight
      } else if (value === 'left') {
        el.scrollLeft = 0
      } else if (value === 'top left') {
        el.scrollTop = 0
        el.scrollLeft = 0
      } else if (value === 'top right') {
        el.scrollTop = 0
        el.scrollLeft = el.scrollWidth - el.clientWidth
      } else if (value === 'bottom left') {
        el.scrollTop = el.scrollHeight - el.clientHeight
        el.scrollLeft = 0
      } else if (value === 'bottom right') {
        el.scrollTop = el.scrollHeight - el.clientHeight
        el.scrollLeft = el.scrollWidth - el.clientWidth
      } else if (value === 'middle') {
        el.scrollTop = (el.scrollHeight - el.clientHeight) / 2<commit_msg>use center instead of middle<commit_after>// import autoscroll from './directives/autoscroll';

export const autoscroll = {
  scroll: function (el, value) {
    // Suported value
    var autoPositions = [
      'top',
      'right',
      'bottom',
      'left',
      'center',
      'top left',
      'top right',
      'bottom left',
      'bottom right',
      'top center',
      'left center',
      'right center',
      'bottom center'
    ]

    if (autoPositions.includes(value)) {
      if (value === 'top') {
        el.scrollTop = 0
      } else if (value === 'right') {
        el.scrollLeft = el.scrollWidth - el.clientWidth
      } else if (value === 'bottom') {
        el.scrollTop = el.scrollHeight - el.clientHeight
      } else if (value === 'left') {
        el.scrollLeft = 0
      } else if (value === 'top left') {
        el.scrollTop = 0
        el.scrollLeft = 0
      } else if (value === 'top right') {
        el.scrollTop = 0
        el.scrollLeft = el.scrollWidth - el.clientWidth
      } else if (value === 'bottom left') {
        el.scrollTop = el.scrollHeight - el.clientHeight
        el.scrollLeft = 0
      } else if (value === 'bottom right') {
        el.scrollTop = el.scrollHeight - el.clientHeight
        el.scrollLeft = el.scrollWidth - el.clientWidth
      } else if (value === 'center') {
        el.scrollTop = (el.scrollHeight - el.clientHeight) / 2
{'fraction_non_alphanumeric': 0.14153390144497963, 'fraction_numerical': 0.005187106335679882, 'mean_word_length': 1.9900332225913622, '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': '6397524', 'n_tokens_mistral': 837, 'n_tokens_neox': 818, 'n_words': 219}