url-accessible
v1.0.1
Published
url accessible
Downloads
7
Readme
URL Accessible
Check if a URL accessible.
Install
yarn add url-accessible -S
Usage
import urlAccessible from 'url-accessible'
await urlAccessible('https://www.baidu.com/')
//=> true
await urlAccessible('https://www.baidu.com/404test')
//=> false
await urlAccessible('http://localhost:8080/')
//=> false
await urlAccessible('not a url')
//=> false