Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse-url

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-url - npm Package Compare versions

Comparing version 5.0.4 to 5.0.5

24

lib/index.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc