whatwg-url-compat
Advanced tools
Comparing version 0.4.2 to 0.5.0
@@ -1043,4 +1043,2 @@ "use strict"; | ||
const reparseSymbol = exports.reparseSymbol = Symbol("reparse"); | ||
function setTheInput(obj, input, url) { | ||
@@ -1058,3 +1056,3 @@ if (url) { | ||
try { | ||
if (obj[baseSymbol] instanceof Function) { | ||
if (typeof obj[baseSymbol] === "function") { | ||
obj[urlSymbol] = new URLStateMachine(input, new URLStateMachine(obj[baseSymbol]()).url); | ||
@@ -1106,3 +1104,3 @@ } else { | ||
try { | ||
return module.exports.getURL()(url.scheme_data).origin; | ||
return module.exports.createURLConstructor()(url.scheme_data).origin; | ||
} catch (e) { | ||
@@ -1282,6 +1280,2 @@ // serializing an opaque identifier returns "null" | ||
URLUtils[reparseSymbol] = function () { | ||
setTheInput(this, this[inputSymbol]); | ||
}; | ||
function urlToASCII(domain) { | ||
@@ -1325,3 +1319,3 @@ try { | ||
module.exports.getURL = function () { | ||
module.exports.createURLConstructor = function () { | ||
function URL() { | ||
@@ -1339,5 +1333,5 @@ this[isURLSymbol] = true; | ||
module.exports.addToObject = function (obj, base) { | ||
module.exports.mixinURLUtils = function (obj, base) { | ||
obj[isURLSymbol] = false; | ||
if (base instanceof Function) { | ||
if (typeof base === "function") { | ||
obj[baseSymbol] = base; | ||
@@ -1351,1 +1345,9 @@ } else { | ||
}; | ||
module.exports.setTheInput = function(obj, input) { | ||
setTheInput(obj, input, null); | ||
}; | ||
module.exports.reparse = function (obj) { | ||
setTheInput(obj, obj[inputSymbol]); | ||
}; |
{ | ||
"name": "whatwg-url-compat", | ||
"version": "0.4.2", | ||
"version": "0.5.0", | ||
"description": "An implementation of the WHATWG URL algorithm", | ||
@@ -5,0 +5,0 @@ "main": "lib/url.js", |
@@ -1,3 +0,7 @@ | ||
# WHATWG-URL | ||
# whatwg-url | ||
WHATWG-URL is a full implementation of the [WHATWG URL](https://url.spec.whatwg.org/) specification. | ||
whatwg-url is a full implementation of the [WHATWG URL](https://url.spec.whatwg.org/) specification. | ||
## Current State | ||
whatwg-url is currently up to date with the URL spec up to commit [1eab2abb38](https://github.com/whatwg/url/tree/1eab2abb3806158fc7a550ac5b7deb2d6fff5602). |
Sorry, the diff of this file is not supported yet
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
37769
1177
7