<commit_before>"use strict";

var isCallable = require("./object/is-callable");

module.exports = function (value) {
	try {
		if (value && isCallable(value.toString)) return value.toString();
		return String(value);
	} catch (e) {
		return "<non-stringifiable value>";
	}
};<commit_msg>feat: improve non-stringifiable string representation<commit_after>"use strict";

var isCallable = require("./object/is-callable");

module.exports = function (value) {
	try {
		if (value && isCallable(value.toString)) return value.toString();
		return String(value);
	} catch (e) {
		return "[Non-stringifiable value]";
	}
};
{'fraction_non_alphanumeric': 0.16339869281045752, 'fraction_numerical': 0.0, 'mean_word_length': 5.009803921568627, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '5065726', 'n_tokens_mistral': 200, 'n_tokens_neox': 193, 'n_words': 46}