<commit_before>#!/usr/bin/env node

'use strict';

const yargs = require('yargs');
const runscripts = require('runscripts');
const chalk = require('chalk');

const argv = yargs.argv;
const command = argv._[0];


const handleError = err => {
  if (err.code === 'ENOSCRIPT' || err.code === 'ENOCONFIG') {
    process.stderr.write(`\n${chalk.bold.red(err.code)}: ${err.message}\n`);
    process.exit(-1);
  }

  process.stderr.write(`\n${err.stack}\n`);
};

if (!command) {
  runscripts.readScriptsObject()
    .then(scripts => {
      process.stdout.write(`<commit_msg>improvement to JSON parsing error<commit_after>#!/usr/bin/env node

'use strict';

const yargs = require('yargs');
const runscripts = require('runscripts');
const chalk = require('chalk');

const argv = yargs.argv;
const command = argv._[0];


const handleError = err => {

  if (err.code === 'EINVALIDPKG' || err.code === 'ENOSCRIPT' || err.code === 'ENOCONFIG') {
    process.stderr.write(`\n${chalk.bold.red(err.code)}: ${err.message}\n`);
    process.exit(-1);
  }

  //process.stderr.write(`\n${err.stack}\n`);
};

if (!command) {
  runscripts.readScriptsObject()
    .then(scripts => {
      process.stdout.write(`
{'fraction_non_alphanumeric': 0.2055602358887953, 'fraction_numerical': 0.003369839932603201, 'mean_word_length': 4.05531914893617, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4238330', 'n_tokens_mistral': 423, 'n_tokens_neox': 417, 'n_words': 77}