rails-delegate
Advanced tools
Comparing version 0.4.1 to 0.5.0
@@ -54,8 +54,14 @@ // Generated by LiveScript 1.4.0 | ||
_delegateEvent = function(eventName, from, to){ | ||
var i$, ref$, len$, source, results$ = []; | ||
debug("delegating event '" + eventName + "'"); | ||
return from.on(eventName, function(){ | ||
for (i$ = 0, len$ = (ref$ = flatten([from])).length; i$ < len$; ++i$) { | ||
source = ref$[i$]; | ||
results$.push(source.on(eventName, fn$)); | ||
} | ||
return results$; | ||
function fn$(){ | ||
var params; | ||
params = slice$.call(arguments); | ||
return to.emit.apply(to, [eventName].concat(slice$.call(params))); | ||
}); | ||
} | ||
}; | ||
@@ -62,0 +68,0 @@ module.exports = { |
{ | ||
"name": "rails-delegate", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "A simple helper to implement the delegation pattern in JavaScript code bases", | ||
@@ -5,0 +5,0 @@ "main": "lib/rails-delegate.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6446
71