Comparing version 5.0.4 to 5.0.5
@@ -1,6 +0,8 @@ | ||
"use strict" | ||
"use strict"; | ||
const parsePath = require("parse-path") | ||
, normalizeUrl = require("normalize-url") | ||
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; }; | ||
var parsePath = require("parse-path"), | ||
normalizeUrl = require("normalize-url"); | ||
/** | ||
@@ -35,18 +37,20 @@ * parseUrl | ||
*/ | ||
function parseUrl(url, normalize = false) { | ||
function parseUrl(url) { | ||
var normalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
if (typeof url !== "string" || !url.trim()) { | ||
throw new Error("Invalid url.") | ||
throw new Error("Invalid url."); | ||
} | ||
if (normalize) { | ||
if (typeof normalize !== "object") { | ||
if ((typeof normalize === "undefined" ? "undefined" : _typeof(normalize)) !== "object") { | ||
normalize = { | ||
stripFragment: false | ||
} | ||
}; | ||
} | ||
url = normalizeUrl(url, normalize) | ||
url = normalizeUrl(url, normalize); | ||
} | ||
const parsed = parsePath(url) | ||
var parsed = parsePath(url); | ||
return parsed; | ||
} | ||
module.exports = parseUrl; | ||
module.exports = parseUrl; |
{ | ||
"name": "parse-url", | ||
"version": "5.0.4", | ||
"version": "5.0.5", | ||
"description": "An advanced url parser supporting git urls too.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -249,4 +249,4 @@ <!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. --> | ||
- `normalize-id` | ||
- `egg-muc-custom-loader` | ||
- `hologit` | ||
- `egg-muc-custom-loader` | ||
- `vrt-cli` | ||
@@ -296,3 +296,2 @@ - `native-zip` | ||
- `@datalogic/react-native-datalogic-module` | ||
- `soajs.repositories` | ||
- `@ndla/source-map-resolver` | ||
@@ -302,7 +301,12 @@ - `birken-react-native-community-image-editor` | ||
- `react-native-modal-progress-bar` | ||
- `cv-app-payment-adyen` | ||
- `react-native-flyy` | ||
- `@hawkingnetwork/react-native-tab-view` | ||
- `miguelcostero-ng2-toasty` | ||
- `vue-cli-plugin-ut-builder` | ||
- `cv-app-payment-adyen` | ||
- `drowl-base-theme-iconset` | ||
- `gitlab-backup-util-harduino` | ||
- `loast` | ||
- `rn-custom-tabview` | ||
- `homebridge-pushcutter` | ||
- `soajs.repositories` | ||
@@ -309,0 +313,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
12926
49
340