<commit_before>var _ = require('lodash');

module.exports = function(config) {
	if(!_.isNumber(config.port)) throw new Error();

	return {
		development: 'localhost:' + config.port,
		testing: 'changeThisFool.testing.thecodebureau.com',
		staging: 'changeThisFool.thecodebureau.com',
		production: 'www.changeThisFool.se'
	}[ENV];
};<commit_msg>Better and more descriptive handling of config.port not being a valid number.<commit_after>var _ = require('lodash');

module.exports = function(config) {
	if(!config.port || !_.isNumber(config.port)) throw new Error("'config.port' is not a number");

	return {
		development: 'localhost:' + config.port,
		testing: 'changeThisFool.testing.thecodebureau.com',
		staging: 'changeThisFool.thecodebureau.com',
		production: 'www.changeThisFool.se'
	}[ENV];
};
{'fraction_non_alphanumeric': 0.15355805243445692, 'fraction_numerical': 0.0, 'mean_word_length': 5.683333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3786151', 'n_tokens_mistral': 280, 'n_tokens_neox': 262, 'n_words': 54}