Skip to content

Commit

Permalink
Merge pull request #19 from sqren/master
Browse files Browse the repository at this point in the history
More JSHint fixes
  • Loading branch information
jrconlin committed Jul 26, 2013
2 parents 01fd6dc + edc13b2 commit db25c00
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions js/OAuthSimple.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ if (OAuthSimple === undefined)
}

var j, pName, pLength, result = 'OAuth ';
for (pName in this._parameters)
{
for (pName in this._parameters){
if(this._parameters.hasOwnProperty(pName)){
if (pName.match(/^oauth/) === undefined) {
continue;
}
Expand All @@ -307,6 +307,7 @@ if (OAuthSimple === undefined)
{
result += pName + '="' + this._oauthEscape(this._parameters[pName]) + '", ';
}
}
}
return result.replace(/,\s+$/, '');
};
Expand All @@ -330,7 +331,7 @@ if (OAuthSimple === undefined)
if (result[keyToken[0]]) {
if (!(result[keyToken[0]] instanceof Array))
{
result[keyToken[0]] = Array(result[keyToken[0]], value);
result[keyToken[0]] = new Array(result[keyToken[0]], value);
}
else
{
Expand Down Expand Up @@ -412,12 +413,13 @@ if (OAuthSimple === undefined)
paramNames = [],
i = 0,
ra = 0;
for (var paramName in this._parameters)
{
for (var paramName in this._parameters){
if (this._parameters.hasOwnProperty(paramName)) {
if (ra++ > 1000) {
throw ('runaway 1');
}
throw ('runaway 1');
}
paramNames.unshift(paramName);
}
}
paramNames = paramNames.sort();
var pLen = paramNames.length;
Expand Down Expand Up @@ -470,7 +472,9 @@ if (OAuthSimple === undefined)
if (target === undefined)
target = {};
for (var key in source) {
if (source.hasOwnProperty(key)) {
target[key] = source[key];
}
}
return target;
};
Expand Down

0 comments on commit db25c00

Please sign in to comment.