sitemap-stream-parser
Advanced tools
Comparing version 1.1.1 to 1.1.2
12
index.js
@@ -76,5 +76,7 @@ // Generated by CoffeeScript 1.10.0 | ||
})(this)); | ||
parserStream.on('error', function(err) { | ||
return done(err); | ||
}); | ||
parserStream.on('error', (function(_this) { | ||
return function(err) { | ||
return done(err); | ||
}; | ||
})(this)); | ||
parserStream.on('text', (function(_this) { | ||
@@ -97,3 +99,3 @@ return function(text) { | ||
return function() { | ||
return done(null, _this.visited_sitemaps); | ||
return done(null); | ||
}; | ||
@@ -118,3 +120,3 @@ })(this)); | ||
queue.drain = function() { | ||
return done(); | ||
return done(null, Object.keys(sitemapParser.visited_sitemaps)); | ||
}; | ||
@@ -121,0 +123,0 @@ return queue.push(urls); |
{ | ||
"name": "sitemap-stream-parser", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Get a list of URLs from one or more sitemaps", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,3 +13,3 @@ # node-sitemap-stream-parser | ||
sitemaps.parseSitemap('http://example.com/sitemap.xml', console.log, function(err, sitemaps) { | ||
sitemaps.parseSitemaps('http://example.com/sitemap.xml', console.log, function(err, sitemaps) { | ||
console.log('All done!'); | ||
@@ -27,3 +27,3 @@ }); | ||
all_urls = [] | ||
sitemaps.parseSitemap(urls, function(url) { all_urls.push[url] });, function(err, sitemaps) { | ||
sitemaps.parseSitemaps(urls, function(url) { all_urls.push[url] });, function(err, sitemaps) { | ||
console.log(all_urls); | ||
@@ -39,5 +39,5 @@ console.log('All done!'); | ||
sitemaps.sitemapsInRobots('http://example.com/robots.txt', function(urls) { | ||
sitemaps.sitemapsInRobots('http://example.com/robots.txt', function(err, urls) { | ||
if(urls.length > 0) { | ||
sitemaps.parseSitemap('http://example.com/sitemap.xml', console.log, function(err, sitemaps) { | ||
sitemaps.parseSitemaps(urls, console.log, function(err, sitemaps) { | ||
console.log(sitemaps); | ||
@@ -44,0 +44,0 @@ }); |
Sorry, the diff of this file is not supported yet
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
19482
121