@webcomponents/url
Advanced tools
Comparing version 0.7.1 to 0.7.2
{ | ||
"name": "@webcomponents/url", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"main": "url.js", | ||
@@ -16,3 +16,4 @@ "repository": { | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"build": "gulp", | ||
"prepack": "npm run build" | ||
}, | ||
@@ -22,3 +23,8 @@ "author": "Erik Arvidsson <arv@chromium.org>", | ||
"access": "public" | ||
}, | ||
"devDependencies": { | ||
"google-closure-compiler": "^20180910.0.0", | ||
"gulp": "^4.0.0", | ||
"gulp-sourcemaps": "^2.6.4" | ||
} | ||
} |
20
url.js
/* Any copyright is dedicated to the Public Domain. | ||
* http://creativecommons.org/publicdomain/zero/1.0/ */ | ||
/** @type {boolean|undefined} */ | ||
Window.prototype.forceJURL = false; | ||
(function(scope) { | ||
@@ -83,2 +86,7 @@ 'use strict'; | ||
/** | ||
* @param {!string} input | ||
* @param {?string=} stateOverride | ||
* @param {(URL|string)=} base | ||
*/ | ||
function parse(input, stateOverride, base) { | ||
@@ -469,3 +477,5 @@ function err(message) { | ||
* @constructor | ||
* @implements {URL} | ||
* @extends {URL} | ||
* @param {!string} url | ||
* @param {(URL|string)=} base | ||
*/ | ||
@@ -476,6 +486,6 @@ function jURL(url, base /* , encoding */) { | ||
this._url = url; | ||
this._url = '' + url; | ||
clear.call(this); | ||
var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, ''); | ||
var input = this._url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, ''); | ||
// encoding = encoding || 'utf-8' | ||
@@ -577,2 +587,6 @@ | ||
return; | ||
if(!hash) { | ||
this._fragment = ''; | ||
return; | ||
} | ||
this._fragment = '#'; | ||
@@ -579,0 +593,0 @@ if ('#' == hash[0]) |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
168379
16
2910
1
0
3