fast-url-parser
Advanced tools
Comparing version 1.0.6-0 to 1.0.7-0
{ | ||
"name": "fast-url-parser", | ||
"description": "Extremely fast implementation of node core url library", | ||
"version": "1.0.6-0", | ||
"keywords": [ | ||
"fast", | ||
"parse", | ||
"parser", | ||
"url", | ||
"uri", | ||
"performance" | ||
], | ||
"scripts": { | ||
"test": "grunt test" | ||
}, | ||
"homepage": "https://github.com/petkaantonov/urlparser", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/petkaantonov/urlparser.git" | ||
}, | ||
"bugs": { | ||
"url": "http://github.com/petkaantonov/urlparser/issues" | ||
}, | ||
"license": "MIT", | ||
"author": { | ||
"name": "Petka Antonov", | ||
"email": "petka_antonov@hotmail.com", | ||
"url": "http://github.com/petkaantonov/" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.1", | ||
"grunt-contrib-jshint": "~0.6.4", | ||
"jshint-stylish": "latest", | ||
"mocha": "~1.12.1", | ||
"grunt-cli": "~0.1.9", | ||
"benchmark": "~1.0.0", | ||
"semver-utils": "~1.1.0" | ||
}, | ||
"readmeFilename": "README.md", | ||
"main": "./src/urlparser.js" | ||
"name": "fast-url-parser", | ||
"description": "Extremely fast implementation of node core url library", | ||
"version": "1.0.7-0", | ||
"keywords": [ | ||
"fast", | ||
"parse", | ||
"parser", | ||
"url", | ||
"uri", | ||
"performance" | ||
], | ||
"scripts": { | ||
"test": "npm run jshint && node ./test/index.js | tap-spec", | ||
"dot": "node ./test/index.js | tap-dot", | ||
"bench": "node ./benchmark/urlparser.js", | ||
"bench-node": "node ./benchmark/nodecore.js", | ||
"jshint": "jshint --verbose ./src/*" | ||
}, | ||
"homepage": "https://github.com/petkaantonov/urlparser", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/petkaantonov/urlparser.git" | ||
}, | ||
"bugs": { | ||
"url": "http://github.com/petkaantonov/urlparser/issues" | ||
}, | ||
"license": "MIT", | ||
"author": { | ||
"name": "Petka Antonov", | ||
"email": "petka_antonov@hotmail.com", | ||
"url": "http://github.com/petkaantonov/" | ||
}, | ||
"dependencies": { | ||
"punycode": "^1.3.2" | ||
}, | ||
"devDependencies": { | ||
"jshint": "^2.5.10", | ||
"tap-dot": "^0.2.3", | ||
"tap-spec": "^2.1.1", | ||
"tape": "^3.0.3" | ||
}, | ||
"readmeFilename": "README.md", | ||
"main": "./src/urlparser.js" | ||
} |
@@ -164,5 +164,2 @@ "use strict"; | ||
} | ||
else if (!slashes && pathname === "/") { | ||
pathname = ""; | ||
} | ||
if (search && search.charCodeAt(0) !== 0x3F /*'?'*/) | ||
@@ -344,3 +341,3 @@ search = "?" + search; | ||
last = srcPath[i]; | ||
if (last == ".") { | ||
if (last === ".") { | ||
srcPath.splice(i, 1); | ||
@@ -405,14 +402,7 @@ } else if (last === "..") { | ||
Url.prototype._hostIdna = function Url$_hostIdna(hostname) { | ||
// IDNA Support: Returns a puny coded representation of "domain". | ||
// It only converts the part of the domain name that | ||
// has non ASCII characters. I.e. it dosent matter if | ||
// you call it with a domain that already is in ASCII. | ||
var domainArray = hostname.split("."); | ||
var newOut = []; | ||
for (var i = 0; i < domainArray.length; ++i) { | ||
var s = domainArray[i]; | ||
newOut.push(s.match(/[^A-Za-z0-9_-]/) ? | ||
"xn--" + punycode.encode(s) : s); | ||
} | ||
return newOut.join("."); | ||
// IDNA Support: Returns a punycoded representation of "domain". | ||
// It only converts parts of the domain name that | ||
// have non-ASCII characters, i.e. it doesn't matter if | ||
// you call it with a domain that already is ASCII-only. | ||
return punycode.toASCII(hostname); | ||
}; | ||
@@ -576,5 +566,5 @@ | ||
this.hostname = hostname; | ||
this.host = this._port > 0 | ||
? "[" + hostname + "]:" + this._port | ||
: "[" + hostname + "]"; | ||
this.host = this._port > 0 ? | ||
"[" + hostname + "]:" + this._port : | ||
"[" + hostname + "]"; | ||
this.pathname = "/"; | ||
@@ -700,3 +690,3 @@ return i + portLength + 1; | ||
if (escaped !== "") { | ||
if (escaped !== "" && escaped !== undefined) { | ||
if (cur < i) ret += str.slice(cur, i); | ||
@@ -1046,5 +1036,5 @@ ret += escaped; | ||
Url.replace = function Url$Replace() { | ||
require.cache["url"] = { | ||
require.cache.url = { | ||
exports: Url | ||
}; | ||
}; |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
4
0
35869
1
5
903
+ Addedpunycode@^1.3.2
+ Addedpunycode@1.4.1(transitive)