Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete unused variables and unused code paths #100

Merged
merged 1 commit into from Aug 4, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/URI.js
Expand Up @@ -356,7 +356,7 @@ for (_part in _parts) {
URI.encodeReserved = generateAccessor("reserved", "encode"); URI.encodeReserved = generateAccessor("reserved", "encode");


URI.parse = function(string, parts) { URI.parse = function(string, parts) {
var pos, t; var pos;
if (!parts) { if (!parts) {
parts = {}; parts = {};
} }
Expand Down Expand Up @@ -1575,15 +1575,11 @@ p.normalizePath = function(build) {
} }


var _was_relative; var _was_relative;
var _was_relative_prefix;
var _path = this._parts.path; var _path = this._parts.path;
var _parent, _pos; var _parent, _pos;


// handle relative paths // handle relative paths
if (_path.charAt(0) !== '/') { if (_path.charAt(0) !== '/') {
if (_path.charAt(0) === '.') {
_was_relative_prefix = _path.substring(0, _path.indexOf('/'));
}
_was_relative = true; _was_relative = true;
_path = '/' + _path; _path = '/' + _path;
} }
Expand Down Expand Up @@ -1762,7 +1758,7 @@ p.absoluteTo = function(base) {
p.relativeTo = function(base) { p.relativeTo = function(base) {
var relative = this.clone(); var relative = this.clone();
var properties = ['protocol', 'username', 'password', 'hostname', 'port']; var properties = ['protocol', 'username', 'password', 'hostname', 'port'];
var common, _base, _this, _base_diff, _this_diff; var common, _base, _this, _this_diff;


if (relative._parts.urn) { if (relative._parts.urn) {
throw new Error('URNs do not have any generally defined hierachical components'); throw new Error('URNs do not have any generally defined hierachical components');
Expand Down Expand Up @@ -1801,7 +1797,6 @@ p.relativeTo = function(base) {
return relative.build(); return relative.build();
} }


_base_diff = _base.substring(common.length);
_this_diff = _this.substring(common.length); _this_diff = _this.substring(common.length);


// this is a descendant of base // this is a descendant of base
Expand Down