is-url-superb
TypeScript icon, indicating that this package has built-in type declarations

6.1.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 6.1.0
    39,866
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 6.1.0
    39,866
  • 6.0.0
    20
  • 5.0.0
    7,520
  • 4.0.0
    1,044,675
  • 3.0.0
    104,933
  • 2.0.0
    6,912
  • 1.0.1
    1
  • 1.0.0
    7

Package Sidebar

Install

npm i is-url-superb

Weekly Downloads

993,305

Version

6.1.0

License

MIT

Unpacked Size

3.25 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus