Comparing version 1.1.1 to 1.2.0
@@ -1,4 +0,1 @@ | ||
/** | ||
* Events | ||
*/ | ||
function Events(target){ | ||
@@ -20,3 +17,3 @@ var events = {}, i, list, args, A = Array; | ||
i = list.length = func ? list.length : 0 | ||
while(~--i<0) func == list[i].f && list.splice(i,1) | ||
while(i-->0) func == list[i].f && list.splice(i,1) | ||
} | ||
@@ -33,2 +30,3 @@ /** | ||
} | ||
module.exports = Events | ||
var u, module, cjs = module != u; | ||
(cjs ? module : window)[(cjs ? 'exports' : 'Events')] = Events; |
@@ -1,1 +0,1 @@ | ||
function Events(a){var c,d,e,b={},f=Array;a=a||this,a.on=function(a,c,d){b[a]||(b[a]=[]),b[a].push({f:c,c:d})},a.off=function(a,e){for(d=b[a]||[],c=d.length=e?d.length:0;~--c<0;)e==d[c].f&&d.splice(c,1)},a.emit=function(){for(e=f.apply([],arguments),d=b[e.shift()]||[],c=d.length,j=0;c>j;j++)d[j].f.apply(d[j].c,e)}}module.exports=Events; | ||
function Events(b){var e={},c,a,d,f=Array;b=b||this;b.on=function(a,c,b){e[a]||(e[a]=[]);e[a].push({f:c,c:b})};b.off=function(b,d){a=e[b]||[];for(c=a.length=d?a.length:0;0<c--;)d==a[c].f&&a.splice(c,1)};b.emit=function(){d=f.apply([],arguments);a=e[d.shift()]||[];c=a.length;for(j=0;j<c;j++)a[j].f.apply(a[j].c,d)}}var u,module,cjs=module!=u;(cjs?module:window)[cjs?"exports":"Events"]=Events; |
{ | ||
"name": "minivents", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Tiny eventing for javascript", | ||
@@ -5,0 +5,0 @@ "main": "minivents.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
6591
92