checklink
v1.0.0
Published
check deadlinks by nodejs
Downloads
16
Readme
checklink
check deadlink by nodejs.
Install
npm install --save checklink
Example
var checklink = require('checklink');
checklink('https://taobao.com')
.then(function(results) {
// {isPassed: true, count: 1, deadlinks: []}
console.log(results);
});
checklink(['https://taobao.com', 'http://xxxhhhhhh.com'])
.then(function(results) {
// {isPassed: false, count: 4, deadlinks:[{url: 'hxhxhhxhx.com.cn', code: 400, message: 'Bad Request'}]}
console.log(results);
});
Test
npm test
License
MIT © 2015 sobear