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 1.3.1 to 1.3.2

40

lib/index.js

@@ -0,5 +1,6 @@

"use strict";
// Dependencies
const protocols = require("protocols")
, isSsh = require("is-ssh")
;
var protocols = require("protocols"),
isSsh = require("is-ssh");

@@ -27,19 +28,17 @@ /**

var output = {
protocols: protocols(url)
, protocol: null
, port: null
, resource: ""
, user: ""
, pathname: ""
, hash: ""
, search: ""
, href: url
}
, protocolIndex = url.indexOf("://")
, resourceIndex = -1
, splits = null
, parts = null
;
protocols: protocols(url),
protocol: null,
port: null,
resource: "",
user: "",
pathname: "",
hash: "",
search: "",
href: url
},
protocolIndex = url.indexOf("://"),
resourceIndex = -1,
splits = null,
parts = null;
output.protocol = output.protocols[0] || (isSsh(url) ? "ssh" : "file");

@@ -61,3 +60,2 @@

// domain.com:port

@@ -97,2 +95,2 @@ splits = output.resource.split(":");

module.exports = parseUrl;
module.exports = parseUrl;
{
"name": "parse-url",
"version": "1.3.1",
"version": "1.3.2",
"description": "An advanced url parser supporting git urls too.",

@@ -45,2 +45,3 @@ "main": "lib/index.js",

"menu/",
"scripts/",
"cli.js",

@@ -47,0 +48,0 @@ "index.js"

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