repository/ninjs/utilities/array.js in ninjs-0.9.2 vs repository/ninjs/utilities/array.js in ninjs-0.10.0
- old
+ new
@@ -9,11 +9,11 @@
Array.method('each', function(callback) {
try {
if(is_undefined(callback)) {
throw new SyntaxError("Array.each(callback): callback is undefined");
}
-
+
for (var i = 0; i < this.length; i++) {
var args = [this[i], i];
callback.apply(this, args);
}
}
@@ -27,8 +27,8 @@
this.each(function(value, index) {
if(value === suspect) {
matches.push(index);
}
});
-
+
return matches.not_empty() ? matches : false;
-});
+});
\ No newline at end of file