<commit_before>const fs = require('fs-extra')
const path = require('path')
const escape = require('escape-string-regexp')
const utils = require('./utils')

const escapedPath = escape(process.cwd())

require('babel-register')({
  // Pass preset directly. Otherwise Babel would try to get it relative to cwd
  presets: [require('babel-preset-es2015')],
  only: new RegExp(escapedPath)
})

const file = path.normalize(process.cwd() + '/index.js')
let controls = false

if (utils.exists(file)) {
  controls = require(file)
}

module.exports = controls.default<commit_msg>Set options for babel register<commit_after>const fs = require('fs-extra')
const path = require('path')
const escape = require('escape-string-regexp')
const utils = require('./utils')

const escapedPath = escape(process.cwd())
const file = path.normalize(process.cwd() + '/index.js')

require('babel-register')({
  // Pass preset directly. Otherwise Babel would try to get it relative to cwd
  presets: [require('babel-preset-es2015')],
  only: new RegExp(escapedPath),
  ignore: false,
  filename: path.basename(file),
  sourceRoot: process.cwd()
})

let controls = false

if (utils.exists(file)) {
  controls = require(file)
}

module.exports = controls.default
{'fraction_non_alphanumeric': 0.14796747967479676, 'fraction_numerical': 0.0065040650406504065, 'mean_word_length': 5.064039408866995, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7103750', 'n_tokens_mistral': 395, 'n_tokens_neox': 386, 'n_words': 103}