code: function lookahead (n) {
      let counter = current
      const target = current + n
      let res = ''
      while (counter < target) {
        res += input[++counter]
      }
      return res
    }
docs: Utility: looks ahead n characters and returns the result