<commit_before>const Command = require('ronin').Command
const IPFS = require('../../ipfs-core')
const debug = require('debug')
let log = debug('cli:id')
log.error = debug('cli:id:error')

module.exports = Command.extend({
  desc: 'Shows IPFS Node ID info',

  options: {
    format: {
      alias: 'f',
      type: 'string'
    }
  },

  run: name => {
    let node = new IPFS()
    node.id((err, id) => {
      if (err) { return log.error(err) }
      console.log(id)
    })
  }
})<commit_msg>let -> const on id.js command file<commit_after>const Command = require('ronin').Command
const IPFS = require('../../ipfs-core')
const debug = require('debug')
let log = debug('cli:id')
log.error = debug('cli:id:error')

module.exports = Command.extend({
  desc: 'Shows IPFS Node ID info',

  options: {
    format: {
      alias: 'f',
      type: 'string'
    }
  },

  run: name => {
    const node = new IPFS()
    node.id((err, id) => {
      if (err) { return log.error(err) }
      console.log(id)
    })
  }
})
{'fraction_non_alphanumeric': 0.18694362017804153, 'fraction_numerical': 0.0, 'mean_word_length': 2.734317343173432, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '774945', 'n_tokens_mistral': 359, 'n_tokens_neox': 354, 'n_words': 87}