<commit_before>class Stack {
  constructor() {
    this.value = [];
  }

  push(item) {
    this.value.push(item);
  }

  pop() {
    return this.value.length > 0 ? this.value.pop() : null;
  }

  // returns the top most elements in the stack, but doesn’t delete it.
  peek() {
    return this.value[this.value.length - 1];
  }
<commit_msg>fixed peek method<commit_after>class Stack {
  constructor() {
    this.value = [];
  }

  push(item) {
    this.value.push(item);
  }

  pop() {
    return this.value.length > 0
      ? this.value.pop()
      : null;
  }

  // returns the top most elements in the stack, but doesn’t delete it.
  peek() {
    return this.value.length > 0
      ? this.value[this.value.length - 1]
      : null;
  }

{'fraction_non_alphanumeric': 0.14749661705006767, 'fraction_numerical': 0.006765899864682003, 'mean_word_length': 2.2888888888888888, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '1403564', 'n_tokens_mistral': 270, 'n_tokens_neox': 257, 'n_words': 61}