Comparing version 1.1.2 to 1.2.0
{ | ||
"name": "mini-url", | ||
"description": "Lightweight isomorphic url parser.", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"author": "Dylan Piercey <pierceydylan@gmail.com>", | ||
@@ -47,4 +47,5 @@ "browser": { | ||
"dependencies": { | ||
"get-loc": "^1.0.0", | ||
"global": "^4.3.1" | ||
} | ||
} |
@@ -12,5 +12,5 @@ 'use strict' | ||
// Load up a fake document to handle url resolution and parsing. | ||
var getLocation = require('get-loc') | ||
var parts = require('./parts') | ||
var doc = window.document.implementation.createHTMLDocument('parser') | ||
var loc = (window.history && window.history.location) || window.location || { href: '' } | ||
var $base = doc.head.appendChild(doc.createElement('base')) | ||
@@ -25,3 +25,3 @@ var $a = doc.createElement('a') | ||
var URL = function URL (path, base) { | ||
$base.href = base || loc.href | ||
$base.href = base || getLocation().href | ||
$a.href = path | ||
@@ -28,0 +28,0 @@ |
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
9291
2
+ Addedget-loc@^1.0.0
+ Addedget-loc@1.0.0(transitive)