{"size": 601, "ext": "js", "max_stars_repo_path": "cli.js", "max_stars_repo_name": "verdigado/emojify-hashes", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "cli.js", "max_issues_repo_name": "verdigado/emojify-hashes", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "cli.js", "max_forks_repo_name": "verdigado/emojify-hashes", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.724137931, "max_line_length": 99, "alphanum_fraction": 0.6738768719}
import emojify from './emojify.js'
import crypto from 'crypto'
import readline from 'readline'

console.log('Type something in to generate it\'s sha256 hash and an emoji representation of that.')

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  prompt: 'toSha256ToEmoji> '
})

rl.prompt()

rl.on('line', (line) => {
  const hash = crypto.createHash('sha256').update(line.trim()).digest('hex')
  const emojis = emojify(hash)

  console.log(
    hash,
    emojis
  )

  rl.prompt()
}).on('close', () => {
  console.log('Have a great day!')
  process.exit(0)
})
