Closed lukasoppermann closed 8 years ago
If errors are detected, check-pages calls the done
callback (third parameter of the export) with an Error
instance that has more details. You can console.log
that object for more information. Along the way, the host
object (first parameter of the export) will have its log
or error
methods called with each issue. You can set summary
of the options
object (second parameter of the export) to true
to include all errors in the error object as well.
Here's a simple, stand-alone example you can run via node example.js
after npm install check-pages
:
var checkPages = require("check-pages");
checkPages(
console,
{
pageUrls: ["http://google.com/"],
checkLinks: true,
checkXhtml: true
},
function(err, count) {
if (err) {
console.log("Error object: " + err);
}
console.log("Error count: " + count);
}
);
Awesome, thanks.
Hey,
it generally works, but I get this error, any idea why?