8000 GitHub - sindresorhus/is-url-superb: Check if a string is a URL
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sindresorhus/is-url-superb

Repository files navigation

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

About

Check if a string is a URL

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

0