<commit_before>###
# Add a setting
# @param {String} _id
# @param {Mixed} value
# @param {Object} setting
###
RocketChat.settings.add = (_id, value, options = {}) ->
	if not _id or not value?
		return false

	# console.log '[functions] RocketChat.settings.add -> '.green, 'arguments:', arguments

	if Meteor.settings?[_id]?
		value = Meteor.settings[_id]

	updateSettings =
		i18nLabel: options.i18nLabel or _id

	updateSettings.i18nDescription = options.i18nDescription if options.i18nDescription?
	updateSettings.type = options.type if options.type
	updateSettings.multiline = options.multiline if options.multiline
	updateSettings.group = options.group if options.group
	updateSettings.section = options.section if options.section<commit_msg>Use process.env values on first inserting settings.<commit_after>###
# Add a setting
# @param {String} _id
# @param {Mixed} value
# @param {Object} setting
###
RocketChat.settings.add = (_id, value, options = {}) ->
	if not _id or not value?
		return false

	# console.log '[functions] RocketChat.settings.add -> '.green, 'arguments:', arguments

	if process?.env?[_id]?
		value = process.env[_id]
	else if Meteor.settings?[_id]?
		value = Meteor.settings[_id]

	updateSettings =
		i18nLabel: options.i18nLabel or _id

	updateSettings.i18nDescription = options.i18nDescription if options.i18nDescription?
	updateSettings.type = options.type if options.type
	updateSettings.multiline = options.multiline if options.multiline
	updateSettings.group = options.group if options.group
	updateSettings.section = options.section if options.section
{'fraction_non_alphanumeric': 0.11363636363636363, 'fraction_numerical': 0.012626262626262626, 'mean_word_length': 5.003787878787879, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2976875', 'n_tokens_mistral': 519, 'n_tokens_neox': 484, 'n_words': 130}