is-url-superb
Advanced tools
Comparing version 2.0.0 to 3.0.0
'use strict'; | ||
var urlRegex = require('url-regex')({exact: true}); | ||
const urlRegex = require('url-regex')({exact: true}); | ||
module.exports = function (url) { | ||
module.exports = url => { | ||
if (typeof url !== 'string') { | ||
@@ -6,0 +6,0 @@ throw new TypeError('Expected a string'); |
{ | ||
"name": "is-url-superb", | ||
"version": "2.0.0", | ||
"description": "Check if a string is an URL", | ||
"license": "MIT", | ||
"repository": "sindresorhus/is-url-superb", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "http://sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "node test.js" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"url", | ||
"uri", | ||
"string", | ||
"validate", | ||
"check", | ||
"is" | ||
], | ||
"dependencies": { | ||
"url-regex": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "0.0.4" | ||
} | ||
"name": "is-url-superb", | ||
"version": "3.0.0", | ||
"description": "Check if a string is a URL", | ||
"license": "MIT", | ||
"repository": "sindresorhus/is-url-superb", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava && tsd" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"keywords": [ | ||
"url", | ||
"uri", | ||
"string", | ||
"validate", | ||
"check", | ||
"is" | ||
], | ||
"dependencies": { | ||
"url-regex": "^5.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
} | ||
} |
# is-url-superb [![Build Status](https://travis-ci.org/sindresorhus/is-url-superb.svg?branch=master)](https://travis-ci.org/sindresorhus/is-url-superb) | ||
> Check if a string is an URL | ||
> Check if a string is a URL | ||
@@ -10,5 +10,5 @@ Created because the [`is-url`](https://github.com/segmentio/is-url) module is too loose. This module depends on a much more comprehensive [regex](https://github.com/kevva/url-regex). | ||
```sh | ||
$ npm install --save is-url-superb | ||
``` | ||
$ npm install is-url-superb | ||
``` | ||
@@ -19,8 +19,8 @@ | ||
```js | ||
var isUrl = require('is-url-superb'); | ||
const isUrl = require('is-url-superb'); | ||
isUrl('http://todomvc.com'); | ||
isUrl('https://sindresorhus.com'); | ||
//=> true | ||
isUrl('//todomvc.com'); | ||
isUrl('//sindresorhus.com'); | ||
//=> true | ||
@@ -35,2 +35,2 @@ | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2857
5
23
0
3
+ Addedip-regex@4.3.0(transitive)
+ Addedtlds@1.255.0(transitive)
+ Addedurl-regex@5.0.0(transitive)
- Removedip-regex@1.0.3(transitive)
- Removedurl-regex@3.2.0(transitive)
Updatedurl-regex@^5.0.0