Comparing version 0.0.0 to 1.0.0
{ | ||
"name": "url2", | ||
"version": "0.0.0", | ||
"description": "Node's URL module plus relative pathing", | ||
"author": "Kris Kowal <kris@cixar.com> (https://github.com/kriskowal/url2)", | ||
"homepage": "https://github.com/kriskowal/url2", | ||
"keywords": ["url"], | ||
"main": "url2.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/kriskowal/url2.git" | ||
}, | ||
"devDependencies": { | ||
"jshint": ">=0.9.1", | ||
"jasmine-node": "*", | ||
"cover": "*", | ||
"opener": "*" | ||
}, | ||
"scripts": { | ||
"test": "jasmine-node test", | ||
"lint": "jshint url2.js", | ||
"cover": "cover run node_modules/jasmine-node/bin/jasmine-node test && cover report html && opener cover_html/index.html" | ||
} | ||
"name": "url2", | ||
"version": "1.0.0", | ||
"description": "Node's URL module plus relative pathing", | ||
"author": "Kris Kowal <kris@cixar.com> (https://github.com/kriskowal/url2)", | ||
"homepage": "https://github.com/kriskowal/url2", | ||
"keywords": [ | ||
"url", | ||
"relative", | ||
"resolve", | ||
"parse", | ||
"format" | ||
], | ||
"main": "url2.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/kriskowal/url2.git" | ||
}, | ||
"devDependencies": { | ||
"jshint": "~2.1", | ||
"jasmine-node": "~1.2", | ||
"cover": "~0.2.8", | ||
"opener": "~1.3" | ||
}, | ||
"scripts": { | ||
"test": "jasmine-node test", | ||
"lint": "jshint url2.js", | ||
"cover": "cover run node_modules/jasmine-node/bin/jasmine-node test && cover report html && opener cover_html/index.html" | ||
} | ||
} |
38
url2.js
@@ -1,2 +0,1 @@ | ||
var URL = require("url"); | ||
@@ -8,18 +7,25 @@ | ||
// | ||| hostname | ^- query ----^| | | ||
// proto|| | ^--^^- path ----------------------^| | | ||
// | slashes | port hash^ | ||
// | ^- host ---^ | | ||
// protocol | ^--^^- path ----------------------^| | | ||
// | || | port hash^ | ||
// | slashes ^- host ---^ | | ||
// ^- href ------------------------------------------------------------^ | ||
// Node's URL format uses: | ||
// protocol: gets a colon added if it doesn't have one yet | ||
// slashes: used | ||
// auth: used | ||
// hostname: used if there's no host | ||
// port: used if there's no host | ||
// path: NOT USED AT ALL EVER | ||
// pathname: used | ||
// search: used | ||
// query: used if object and no search | ||
// hash: used | ||
// protocol: gets a colon added if it doesn't have one yet | ||
// slashes: used | ||
// auth: used | ||
// user: not used | ||
// password: not used | ||
// host: | ||
// hostname: used if there's no host | ||
// port: used if there's no host | ||
// path: NOT USED AT ALL EVER | ||
// pathname: used | ||
// root: not used, not produced | ||
// directory: not used, not produced | ||
// directories: not used, not produced | ||
// file: not used, not produced | ||
// search: used | ||
// query: used if object and no search | ||
// hash: used | ||
@@ -30,4 +36,4 @@ exports.resolve = URL.resolve; | ||
exports.parse = parse; | ||
function parse(url) { | ||
var object = URL.parse(url); | ||
function parse() { | ||
var object = URL.parse.apply(URL, arguments); | ||
object.pathname = object.pathname || ""; | ||
@@ -34,0 +40,0 @@ object.root = !!object.pathname.length && object.pathname[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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
9839
238
0