Skip to content

Commit

Permalink
breaker not used, remove
Browse files Browse the repository at this point in the history
since `breaker` is not used anywhere inside the module, and isn't internally visible, you may as well save bytes/cycles!
  • Loading branch information
timruffles committed Dec 19, 2014
1 parent 68d9ba6 commit 64f42b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backbone-events-standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
/* global exports:true, define, module */
(function() {
var root = this,
breaker = {},
nativeForEach = Array.prototype.forEach,
hasOwnProperty = Object.prototype.hasOwnProperty,
slice = Array.prototype.slice,
Expand Down Expand Up @@ -59,12 +58,12 @@
obj.forEach(iterator, context);
} else if (obj.length === +obj.length) {
for (var i = 0, l = obj.length; i < l; i++) {
if (iterator.call(context, obj[i], i, obj) === breaker) return;
iterator.call(context, obj[i], i, obj);
}
} else {
for (var key in obj) {
if (this.has(obj, key)) {
if (iterator.call(context, obj[key], key, obj) === breaker) return;
iterator.call(context, obj[key], key, obj);
}
}
}
Expand Down

0 comments on commit 64f42b7

Please sign in to comment.