<commit_before>const debug = require( 'debug' )( 'get-money' )
const Ledger = require( 'ledger-cli' ).Ledger
const l = new Ledger( { file: process.env.BUDGET_FILE } )


module.exports = {
  balance: function( done ) {
    var assets = {
      fallback: 'Total Assets',
      color: '#4de004',
      title: 'Total Assets',
      text: null,
      fields: [],
      footer: 'Cash',
      footer_icon: 'http://www.webpagefx.com/tools/emoji-cheat-sheet/graphics/emojis/dollar.png'
    }
    let liabilities = {
      fallback: 'Total Liabilities',
      color: '#dd3125',
      title: 'Total Liabilities',
      text: null,
      fields: [],
      footer: 'Credit',
      footer_icon: 'http://www.webpagefx.com/tools/emoji-cheat-sheet/graphics/emojis/credit_card.png'
    }
    l.balance().
      on( 'data', function ( entry ) {
        if ( entry.account.depth == 1 &&
             entry.account.fullname === 'Assets' ) {
          assets.fallback += ` ${ entry.total.formatted }`
          assets.text = entry.total.formatted
        }
        if ( entry.account.depth >= 2 &&
             /^Assets/.test( entry.account.fullname ) &&
             ! /^Assets:Funds$/.test( entry.account.fullname ) ) {
          assets.fields.push( {
            title: entry.account.shortname,
            value: entry.total.formatted,
            short: true,
          } )
        }
        if ( entry.account.depth == 2 &&
             entry.account.fullname === 'Liabilities:Credit' ) {
          liabilities.fallback += ` ${ entry.total.formatted }`
          liabilities.text = entry.total.formatted
        }
        if ( entry.account.depth >= 3 && /^Liabilities:Credit/.test( entry.account.fullname ) ) {
          liabilities.fields.push( {<commit_msg>Var instead of Let<commit_after>const debug = require( 'debug' )( 'get-money' )
const Ledger = require( 'ledger-cli' ).Ledger
const l = new Ledger( { file: process.env.BUDGET_FILE } )


module.exports = {
  balance: function( done ) {
    var assets = {
      fallback: 'Total Assets',
      color: '#4de004',
      title: 'Total Assets',
      text: null,
      fields: [],
      footer: 'Cash',
      footer_icon: 'http://www.webpagefx.com/tools/emoji-cheat-sheet/graphics/emojis/dollar.png'
    }
    var liabilities = {
      fallback: 'Total Liabilities',
      color: '#dd3125',
      title: 'Total Liabilities',
      text: null,
      fields: [],
      footer: 'Credit',
      footer_icon: 'http://www.webpagefx.com/tools/emoji-cheat-sheet/graphics/emojis/credit_card.png'
    }
    l.balance().
      on( 'data', function ( entry ) {
        if ( entry.account.depth == 1 &&
             entry.account.fullname === 'Assets' ) {
          assets.fallback += ` ${ entry.total.formatted }`
          assets.text = entry.total.formatted
        }
        if ( entry.account.depth >= 2 &&
             /^Assets/.test( entry.account.fullname ) &&
             ! /^Assets:Funds$/.test( entry.account.fullname ) ) {
          assets.fields.push( {
            title: entry.account.shortname,
            value: entry.total.formatted,
            short: true,
          } )
        }
        if ( entry.account.depth == 2 &&
             entry.account.fullname === 'Liabilities:Credit' ) {
          liabilities.fallback += ` ${ entry.total.formatted }`
          liabilities.text = entry.total.formatted
        }
        if ( entry.account.depth >= 3 && /^Liabilities:Credit/.test( entry.account.fullname ) ) {
          liabilities.fields.push( {
{'fraction_non_alphanumeric': 0.15001431434297166, 'fraction_numerical': 0.006870884626395649, 'mean_word_length': 2.054195804195804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3899572', 'n_tokens_mistral': 1130, 'n_tokens_neox': 1083, 'n_words': 197}