Comparing version 0.1.0 to 0.1.1
'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 @@ } |
{ | ||
"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", |
11
test.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') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
15910
294
1