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.6 to 5.0.7

24

lib/index.js

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

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