is-url-superb
v6.1.0
Published
Check if a string is a URL
Downloads
6,362,398
Maintainers
Readme
is-url-superb
Check if a string is a URL
Install
$ npm install is-url-superb
Usage
import isUrl from 'is-url-superb';
isUrl('https://sindresorhus.com');
//=> true
isUrl('unicorn');
//=> false
API
isUrl(string, options?)
options
Type: object
lenient
Type: boolean
Default: false
Allow URLs without a protocol.
import isUrl from 'is-url-superb';
isUrl('example.com');
//=> false
isUrl('example.com', {lenient: true});
//=> true
Related
- is - Type check values