An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# checklink [![Build Status](https://travis-ci.org/imsobear/checklink.svg?branch=master)](https://travis-ci.org/imsobear/checklink) [![Coverage Status](https://coveralls.io/repos/imsobear/checklink/badge.svg?branch=master)](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