npm.io
6.1.0 • Published 4 years ago

is-url-superb

Licence
MIT
Version
6.1.0
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
87

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
  • is - Type check values

Keywords