Socket
Socket
Sign inDemoInstall

url-parse

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-parse - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

18

index.js

@@ -7,7 +7,3 @@ 'use strict';

//
// MOARE: Mother Of All Regular Expressions.
//
var regexp = /^(?:(?:(([^:\/#\?]+:)?(?:(?:\/\/)(?:(?:(?:([^:@\/#\?]+)(?:\:([^:@\/#\?]*))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/
, keys = ',,protocol,username,password,host,hostname,port,pathname,query,hash'.split(',')
var keys = ',,protocol,username,password,host,hostname,port,pathname,query,hash'.split(',')
, parts = keys.length;

@@ -32,2 +28,14 @@

//
// Inline the massive regular expression because it causes issues in FireFox
// because our `exec` usage in this function. Normally there should be no side
// affects because we're not doing global matching so the lastIndex of regular
// expression should stay the same but it's causing `too much recursion`
// errors in FireFox when calling the parse method for a second time. Now,
// with great pleasure I introduce to you:
//
// MOARE: Mother Of All Regular Expressions.
//
var regexp = /^(?:(?:(([^:\/#\?]+:)?(?:(?:\/\/)(?:(?:(?:([^:@\/#\?]+)(?:\:([^:@\/#\?]*))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;
//
// The following if statements allows this module two have compatibility with

@@ -34,0 +42,0 @@ // 2 different API:

{
"name": "url-parse",
"version": "0.1.4",
"version": "0.1.5",
"description": "Parse URL in node using the URL module and in the browser using the DOM",

@@ -27,3 +27,3 @@ "main": "index.js",

"assume": "0.0.x",
"browserify": "6.2.x",
"browserify": "7.0.x",
"istanbul": "0.3.x",

@@ -30,0 +30,0 @@ "mocha": "2.0.x",

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