is-url-superb
Check if a string is a URL
Last updated 4 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install is-url-superb 
SYNC missed versions from official npm registry.

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

Current Tags

  • 6.1.0                                ...           latest (3 years ago)

8 Versions

  • 6.1.0                                ...           3 years ago
  • 6.0.0                                ...           4 years ago
  • 5.0.0                                ...           4 years ago
  • 4.0.0                                ...           4 years ago
  • 3.0.0                                ...           6 years ago
  • 2.0.0                                ...           9 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (2)
Downloads
Total 6
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE