<commit_before>#!/usr/bin/env node
'use strict'

const program = require('commander')
const pkg = require('./package.json')
const Repl = require('./index.js')

console.log('Welcome to the Solidity REPL!')

program
  .version(pkg.version)
  .option('--loglevel [value]', 'errors-only (default)/warnings')
  .parse(process.argv)

console.log(program.loglevel)

const printPrompt = () => process.stdout.write('> ')

printPrompt()

let repl = Repl(program)

process.stdin.resume()
process.stdin.setEncoding('utf8')

process.stdin.on('data', command => {
  if (command === 'quit\n') {
    process.exit()
  } else if (command === 'clear\n') {
    repl = Repl(program)
    printPrompt()
  } else {
    // evaluate the command
    repl(command)
      .then(result => {
        // if null is returned, it means the last command was not an expression with a return value
        if (result !== null) {
          console.log(result.toString())
        }
      })
      .catch(err => {
        console.log(err)
      })
      .then(printPrompt)
  }
})
<commit_msg>Remove console<commit_after>#!/usr/bin/env node
'use strict'

const program = require('commander')
const pkg = require('./package.json')
const Repl = require('./index.js')

console.log('Welcome to the Solidity REPL!')

program
  .version(pkg.version)
  .option('--loglevel [value]', 'errors-only (default)/warnings')
  .parse(process.argv)

const printPrompt = () => process.stdout.write('> ')

printPrompt()

let repl = Repl(program)

process.stdin.resume()
process.stdin.setEncoding('utf8')

process.stdin.on('data', command => {
  if (command === 'quit\n') {
    process.exit()
  } else if (command === 'clear\n') {
    repl = Repl(program)
    printPrompt()
  } else {
    // evaluate the command
    repl(command)
      .then(result => {
        // if null is returned, it means the last command was not an expression with a return value
        if (result !== null) {
          console.log(result.toString())
        }
      })
      .catch(err => {
        console.log(err)
      })
      .then(printPrompt)
  }
})

{'fraction_non_alphanumeric': 0.16489874638379942, 'fraction_numerical': 0.0009643201542912247, 'mean_word_length': 2.9150943396226414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '5761055', 'n_tokens_mistral': 681, 'n_tokens_neox': 678, 'n_words': 156}