Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Break out of .each early with return false, fixes #72

  • Loading branch information...
commit df29e0366357e35d3dd99951a65fa6e29d610314 1 parent fcb6273
@chriso authored
Showing with 5 additions and 4 deletions.
  1. +2 −1  HISTORY.md
  2. +2 −2 lib/node.io/dom.js
  3. +1 −1  package.json
View
3  HISTORY.md
@@ -1,4 +1,5 @@
-### v0.4.4
+### v0.4.7
+ * Break out of .each early with return false
* Bug fix for nested getHtml
* Bug fix for write permissions
* Bug fix for the eval builtin
View
4 lib/node.io/dom.js
@@ -268,12 +268,12 @@ Job.prototype.bindToDomCollection = function (collection) {
for (x = 0; x <= last; x++) {
if (!condition()) continue;
self.bindToDomElement(collection[x]);
- callback(collection[x]);
+ if (false === callback(collection[x])) break;
}
} else {
for (x = 0; x <= last; x++) {
if (!condition()) continue;
- callback(collection[x].attribs[attrib]);
+ if (false === callback(collection[x].attribs[attrib])) break;
}
}
};
View
2  package.json
@@ -1,6 +1,6 @@
{ "name" : "node.io",
"description" : "A distributed data scraping and processing framework",
- "version" : "0.4.6",
+ "version" : "0.4.7",
"homepage" : "http://github.com/chriso/node.io",
"keywords" : ["data","mapreduce","map","reduce","scraping","html","parsing","parse","scrape","process","processing","data"],
"author" : "Chris O'Hara <cohara87@gmail.com>",
Please sign in to comment.
Something went wrong with that request. Please try again.