$ npm install is-url-superb
Check if a string is a URL
$ npm install is-url-superb
import isUrl from 'is-url-superb';
isUrl('https://sindresorhus.com');
//=> true
isUrl('unicorn');
//=> false
Type: object
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
© 2010 - cnpmjs.org x YWFE | Home | YWFE