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.0 to 0.1.1

12

lolcation.js
'use strict';
var URL;
/**
* These properties should not be copied or inherited from. This is only needed
* for all non blob URL's as the a blob URL does not include a hash, only the
* origin.
*
* @type {Object}
* @private
*/
var ignore = { hash: 1, query: 1 }
, URL;

@@ -27,2 +36,3 @@ /**

} else for (key in location) {
if (key in ignore) continue;
finaldestination[key] = location[key];

@@ -29,0 +39,0 @@ }

2

package.json
{
"name": "url-parse",
"version": "0.1.0",
"version": "0.1.1",
"description": "Parse URL in node using the URL module and in the browser using the DOM",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -96,2 +96,13 @@ describe('url-parse', function () {

it('does not inherit hashes and query strings from source object', function () {
var data = parse('/foo', parse('http://foo:bar@sub.example.com/bar?foo=bar#hash'));
assume(data.port).equals('');
assume(data.username).equals('foo');
assume(data.password).equals('bar');
assume(data.host).equals('sub.example.com');
assume(data.href).equals('http://foo:bar@sub.example.com/foo');
});
describe('fuzzy', function () {

@@ -98,0 +109,0 @@ var fuzz = require('./fuzzy')

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