<commit_before>/*
---
 
script: Events.js
 
description: A mixin that adds support for declarative events assignment
 
license: Public domain (http://unlicense.org).
 
requires:
	- LSD
	- Core/Events
	- Core/Element.Event
	- More/Element.Delegation
	- Ext/Element.Properties.widget
 
provides: 
	- LSD.Module.Events
 
...
*/


LSD.Module.Events = new Class({
	
	addEvents: function(events) {
		return this.setEvents(events, true);
	},
	
	removeEvents: function(events) {
		return this.setEvents(events, false);
	},
	
	setEvents: function(events, state) {
		var convert = LSD.Module.Events.target, method = state ? 'addEvents' : 'removeEvents', old = Events.prototype[method];
		for (var i in events) { 
			if (events[i].call) { //stick to old behaviour when key: function object is passed<commit_msg>Trying to please forge (again)<commit_after>/*
---
 
script: Events.js
 
description: A mixin that adds support for declarative events assignment
 
license: Public domain (http://unlicense.org).
 
requires:
	- LSD
	- Core/Events
	- Core/Element.Event
	- More/Element.Delegation
	- Ext/Element.Properties.widget
 
provides:
	- LSD.Module.Events

...
*/


LSD.Module.Events = new Class({
	
	addEvents: function(events) {
		return this.setEvents(events, true);
	},
	
	removeEvents: function(events) {
		return this.setEvents(events, false);
	},
	
	setEvents: function(events, state) {
		var convert = LSD.Module.Events.target, method = state ? 'addEvents' : 'removeEvents', old = Events.prototype[method];
		for (var i in events) { 
			if (events[i].call) { //stick to old behaviour when key: function object is passed
{'fraction_non_alphanumeric': 0.13003095975232198, 'fraction_numerical': 0.0, 'mean_word_length': 3.6570605187319885, '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': '6401548', 'n_tokens_mistral': 553, 'n_tokens_neox': 505, 'n_words': 137}