Skip to content

Commit

Permalink
URL -> Url
Browse files Browse the repository at this point in the history
  • Loading branch information
OmgImAlexis committed Jun 28, 2018
1 parent 8904514 commit c42f629
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ function lolcation(loc) {
, key;

if ('blob:' === loc.protocol) {
finaldestination = new URL(unescape(loc.pathname), {});
finaldestination = new Url(unescape(loc.pathname), {});
} else if ('string' === type) {
finaldestination = new URL(loc, {});
finaldestination = new Url(loc, {});
for (key in ignore) delete finaldestination[key];
} else if ('object' === type) {
for (key in loc) {
Expand Down Expand Up @@ -146,9 +146,9 @@ function resolve(relative, base) {
* @param {Boolean|Function} parser Parser for the query string.
* @api public
*/
function URL(address, location, parser) {
if (!(this instanceof URL)) {
return new URL(address, location, parser);
function Url(address, location, parser) {
if (!(this instanceof Url)) {
return new Url(address, location, parser);
}

var relative, extracted, parse, instruction, index, key
Expand Down Expand Up @@ -400,14 +400,14 @@ function toString(stringify) {
return result;
}

URL.prototype = { set: set, toString: toString };
Url.prototype = { set: set, toString: toString };

//
// Expose the URL parser and some additional properties that might be useful for
// others or testing.
//
URL.extractProtocol = extractProtocol;
URL.location = lolcation;
URL.qs = qs;
Url.extractProtocol = extractProtocol;
Url.location = lolcation;
Url.qs = qs;

module.exports = URL;
module.exports = Url;

0 comments on commit c42f629

Please sign in to comment.