https://github.com/imsobear/checklink
check deadlink by nodejs
https://github.com/imsobear/checklink
Last synced: 3 months ago
JSON representation
check deadlink by nodejs
- Host: GitHub
- URL: https://github.com/imsobear/checklink
- Owner: imsobear
- License: mit
- Created: 2015-10-21T03:12:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-21T03:48:30.000Z (over 9 years ago)
- Last Synced: 2025-01-22T20:51:30.633Z (4 months ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# checklink [](https://travis-ci.org/imsobear/checklink) [](https://coveralls.io/r/imsobear/checklink?branch=master)
> check deadlink by nodejs.
## Install
```bash
npm install --save checklink
```## Example
```javascript
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
```bash
npm test
```## License
MIT © 2015 sobear