reachable-urls
Version:
Check URLs are reachable in text
50 lines (35 loc) • 1.24 kB
Markdown
# reachable-urls
Check URLs are reachable in text.
[](https://travis-ci.org/1000ch/reachable-urls)
[](http://badge.fury.io/js/reachable-urls)
[](https://david-dm.org/1000ch/reachable-urls)
[](https://david-dm.org/1000ch/reachable-urls#type=dev)

## Install
```bash
$ npm install --save reachable-urls
```
## Usage
### CLI
```bash
Usage
$ reachable-urls [<file|glob> ...]
Options
--compact Show only not-reachable URLs
--help Show help
--silent Exit with success always
--version Show version
```
### JavaScript
```javascript
const assert = require('assert');
const reachableUrls = require('reachable-urls');
reachableUrls('https://foobarbaz.com https://github.com').then(result => {
assert.deepEqual(result, {
'https://github.com': true,
'https://foobarbaz.com': false
});
});
```
## License
[MIT](https://1000ch.mit-license.org) © [Shogo Sensui](https://github.com/1000ch)