<commit_before>Scholar.Notifier = new function(){
	var _observers = new Array();
	_observers['columnTree'] = new Scholar.Hash();
	_observers['itemTree'] = new Scholar.Hash();
	
	this.registerColumnTree = registerColumnTree;
	this.registerItemTree = registerItemTree;
	this.unregisterColumnTree = unregisterColumnTree;
	this.unregisterItemTree = unregisterItemTree;
	this.trigger = trigger;
	
	function registerColumnTree(ref){
		return _register('columnTree', ref);
	}
	
	function registerItemTree(ref){
		return _register('itemTree', ref);
	}
	
	function unregisterColumnTree(hash){
		_unregister('columnTree', hash);
	}
	
	function unregisterItemTree(hash){
		_unregister('itemTree', hash);
	}
	
	/**
	* event - 'add', 'remove', 'modify'
	* type - 'collection', 'smartcollection', 'item'
	* ids - single id or array of ids
	**/
	function trigger(event, type, ids){
		switch (type){
			case 'item':
				var treeType = 'itemTree';
				break;
			case 'collection':
			case 'smartcollection':
				var treeType = 'columnTree';
				break;
			default:
				throw('Invalid type in Notifier.trigger()');
		}
		
		Scholar.debug("Notifier.trigger('" + event + "', '" + type + "', "
			+ (typeof ids=='Object' ? ids.join() : ids) + ") called "
			+ "[column trees: " + _observers['columnTree'].length<commit_msg>Put square brackets around ids in notifier debug output if multiple ids passed<commit_after>Scholar.Notifier = new function(){
	var _observers = new Array();
	_observers['columnTree'] = new Scholar.Hash();
	_observers['itemTree'] = new Scholar.Hash();
	
	this.registerColumnTree = registerColumnTree;
	this.registerItemTree = registerItemTree;
	this.unregisterColumnTree = unregisterColumnTree;
	this.unregisterItemTree = unregisterItemTree;
	this.trigger = trigger;
	
	function registerColumnTree(ref){
		return _register('columnTree', ref);
	}
	
	function registerItemTree(ref){
		return _register('itemTree', ref);
	}
	
	function unregisterColumnTree(hash){
		_unregister('columnTree', hash);
	}
	
	function unregisterItemTree(hash){
		_unregister('itemTree', hash);
	}
	
	/**
	* event - 'add', 'remove', 'modify'
	* type - 'collection', 'smartcollection', 'item'
	* ids - single id or array of ids
	**/
	function trigger(event, type, ids){
		switch (type){
			case 'item':
				var treeType = 'itemTree';
				break;
			case 'collection':
			case 'smartcollection':
				var treeType = 'columnTree';
				break;
			default:
				throw('Invalid type in Notifier.trigger()');
		}
		
		Scholar.debug("Notifier.trigger('" + event + "', '" + type + "', "
			+ (typeof ids=='object' ? '[' + ids.join() + ']' : ids) + ") called "
			+ "[column trees: " + _observers['columnTree'].length
{'fraction_non_alphanumeric': 0.15005599104143338, 'fraction_numerical': 0.0, 'mean_word_length': 4.414141414141414, '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': '410627', 'n_tokens_mistral': 929, 'n_tokens_neox': 839, 'n_words': 195}