<commit_before>var SEG_LENGTH = 30;

/**
 *
 */
module.exports = function (str) {
	if (str.length > (SEG_LENGTH * 2) + 3) {
		return str.slice(0, SEG_LENGTH) + '...' + str.slice(-SEG_LENGTH);
	} else {
		return str;
	}
};<commit_msg>add comment<commit_after>var SEG_LENGTH = 30;

/**
 * Truncate 'str'
 * @param {String} str
 * @returns {String}
 */
module.exports = function (str) {
	if (str.length > (SEG_LENGTH * 2) + 3) {
		return str.slice(0, SEG_LENGTH) + '...' + str.slice(-SEG_LENGTH);
	} else {
		return str;
	}
};
{'fraction_non_alphanumeric': 0.1988527724665392, 'fraction_numerical': 0.019120458891013385, 'mean_word_length': 3.330578512396694, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2603247', 'n_tokens_mistral': 225, 'n_tokens_neox': 212, 'n_words': 44}