<commit_before>var fs = require("fs");
var path = require("path");

var Helper = module.exports = {
	getConfig: function () {
		var filename = process.env.SHOUT_CONFIG;
		if(!filename || !fs.exists(filename)) {
			filename = this.resolveHomePath("config.js");
			if(!fs.exists(filename)) {
				filename = path.resolve(__dirname, "..", "config");
			}
		}
		return require(filename);
	},

	getHomeDirectory: function () {
		return (
			(process.env.SHOUT_CONFIG && fs.exists(process.env.SHOUT_CONFIG) && this.getConfig().home)
			|| process.env.SHOUT_HOME
			|| path.resolve(process.env.HOME, ".shout")
		);
	},

	resolveHomePath: function () {
		var fragments = [ Helper.HOME ].concat([].slice.apply(arguments));
		return path.resolve.apply(path, fragments);
	}
};

Helper.HOME = Helper.getHomeDirectory()<commit_msg>Fix fs.exists to existsSync where necessary<commit_after>var fs = require("fs");
var path = require("path");

var Helper = module.exports = {
	getConfig: function () {
		var filename = process.env.SHOUT_CONFIG;
		if(!filename || !fs.existsSync(filename)) {
			filename = this.resolveHomePath("config.js");
			if(!fs.existsSync(filename)) {
				filename = path.resolve(__dirname, "..", "config");
			}
		}
		return require(filename);
	},

	getHomeDirectory: function () {
		return (
			(process.env.SHOUT_CONFIG && fs.existsSync(process.env.SHOUT_CONFIG) && this.getConfig().home)
			|| process.env.SHOUT_HOME
			|| path.resolve(process.env.HOME, ".shout")
		);
	},

	resolveHomePath: function () {
		var fragments = [ Helper.HOME ].concat([].slice.apply(arguments));
		return path.resolve.apply(path, fragments);
	}
};

Helper.HOME = Helper.getHomeDirectory()
{'fraction_non_alphanumeric': 0.17362768496420047, 'fraction_numerical': 0.0, 'mean_word_length': 4.290220820189274, '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': '4174350', 'n_tokens_mistral': 598, 'n_tokens_neox': 545, 'n_words': 92}