$ cnpm install is-url-superb
Check if a string is a URL
Created because the is-url
module is too loose. This module depends on a much more comprehensive regex.
$ npm install is-url-superb
const isUrl = require('is-url-superb');
isUrl('https://sindresorhus.com');
//=> true
isUrl('//sindresorhus.com');
//=> true
isUrl('unicorn');
//=> false
MIT © Sindre Sorhus
Copyright 2013 - present © cnpmjs.org