Comparing version 5.0.6 to 5.0.7
@@ -1,8 +0,6 @@ | ||
"use strict"; | ||
"use strict" | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
const parsePath = require("parse-path") | ||
, normalizeUrl = require("normalize-url") | ||
var parsePath = require("parse-path"), | ||
normalizeUrl = require("normalize-url"); | ||
/** | ||
@@ -37,20 +35,18 @@ * parseUrl | ||
*/ | ||
function parseUrl(url) { | ||
var normalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
function parseUrl(url, normalize = false) { | ||
if (typeof url !== "string" || !url.trim()) { | ||
throw new Error("Invalid url."); | ||
throw new Error("Invalid url.") | ||
} | ||
if (normalize) { | ||
if ((typeof normalize === "undefined" ? "undefined" : _typeof(normalize)) !== "object") { | ||
if (typeof normalize !== "object") { | ||
normalize = { | ||
stripHash: false | ||
}; | ||
} | ||
} | ||
url = normalizeUrl(url, normalize); | ||
url = normalizeUrl(url, normalize) | ||
} | ||
var parsed = parsePath(url); | ||
const parsed = parsePath(url) | ||
return parsed; | ||
} | ||
module.exports = parseUrl; | ||
module.exports = parseUrl; |
{ | ||
"name": "parse-url", | ||
"version": "5.0.6", | ||
"version": "5.0.7", | ||
"description": "An advanced url parser supporting git urls too.", | ||
@@ -35,3 +35,3 @@ "main": "lib/index.js", | ||
"is-ssh": "^1.3.0", | ||
"normalize-url": "4.5.0", | ||
"normalize-url": "4.5.1", | ||
"parse-path": "^4.0.0", | ||
@@ -38,0 +38,0 @@ "protocols": "^1.4.0" |
@@ -295,12 +295,10 @@ <!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. --> | ||
- `@datalogic/react-native-datalogic-module` | ||
- `@ndla/source-map-resolver` | ||
- `birken-react-native-community-image-editor` | ||
- `native-kakao-login` | ||
- `react-native-modal-progress-bar` | ||
- `cv-app-payment-adyen` | ||
- `react-native-flyy` | ||
- `react-native-dsphoto-module` | ||
- `@hawkingnetwork/react-native-tab-view` | ||
- `miguelcostero-ng2-toasty` | ||
- `vue-cli-plugin-ut-builder` | ||
- `cv-app-payment-adyen` | ||
- `react-native-flyy` | ||
- `drowl-base-theme-iconset` | ||
@@ -312,2 +310,4 @@ - `gitlab-backup-util-harduino` | ||
- `soajs.repositories` | ||
- `@ntt_app/react-native-custom-notification` | ||
- `@ndla/source-map-resolver` | ||
@@ -314,0 +314,0 @@ |
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
12961
64
+ Addednormalize-url@4.5.1(transitive)
- Removednormalize-url@4.5.0(transitive)
Updatednormalize-url@4.5.1