couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1037206 - in /couchdb/trunk/share/server: loop.js mimeparse.js render.js state.js util.js views.js
Date Sat, 20 Nov 2010 13:44:42 GMT
Author: fdmanana
Date: Sat Nov 20 13:44:42 2010
New Revision: 1037206

URL: http://svn.apache.org/viewvc?rev=1037206&view=rev
Log:
Fixing some jslint warnings.

Modified:
    couchdb/trunk/share/server/loop.js
    couchdb/trunk/share/server/mimeparse.js
    couchdb/trunk/share/server/render.js
    couchdb/trunk/share/server/state.js
    couchdb/trunk/share/server/util.js
    couchdb/trunk/share/server/views.js

Modified: couchdb/trunk/share/server/loop.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/loop.js?rev=1037206&r1=1037205&r2=1037206&view=diff
==============================================================================
--- couchdb/trunk/share/server/loop.js (original)
+++ couchdb/trunk/share/server/loop.js Sat Nov 20 13:44:42 2010
@@ -72,14 +72,14 @@ var DDoc = (function() {
           var point = ddoc;
           for (var i=0; i < funPath.length; i++) {
             if (i+1 == funPath.length) {
-              fun = point[funPath[i]]
+              var fun = point[funPath[i]];
               if (typeof fun != "function") {
                 fun = Couch.compileFunction(fun, ddoc);
                 // cache the compiled fun on the ddoc
-                point[funPath[i]] = fun
+                point[funPath[i]] = fun;
               };
             } else {
-              point = point[funPath[i]]              
+              point = point[funPath[i]];
             }
           };
 

Modified: couchdb/trunk/share/server/mimeparse.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/mimeparse.js?rev=1037206&r1=1037205&r2=1037206&view=diff
==============================================================================
--- couchdb/trunk/share/server/mimeparse.js (original)
+++ couchdb/trunk/share/server/mimeparse.js Sat Nov 20 13:44:42 2010
@@ -19,13 +19,13 @@
 var Mimeparse = (function() {
   // private helpers
   function strip(string) {
-    return string.replace(/^\s+/, '').replace(/\s+$/, '')
+    return string.replace(/^\s+/, '').replace(/\s+$/, '');
   };
 
   function parseRanges(ranges) {
     var parsedRanges = [], rangeParts = ranges.split(",");
     for (var i=0; i < rangeParts.length; i++) {
-      parsedRanges.push(publicMethods.parseMediaRange(rangeParts[i]))
+      parsedRanges.push(publicMethods.parseMediaRange(rangeParts[i]));
     };
     return parsedRanges;
   };
@@ -148,11 +148,11 @@ var Mimeparse = (function() {
       var parsedHeader = parseRanges(header);
       var weighted = [];
       for (var i=0; i < supported.length; i++) {
-        weighted.push([publicMethods.fitnessAndQualityParsed(supported[i], parsedHeader),
i, supported[i]])
+        weighted.push([publicMethods.fitnessAndQualityParsed(supported[i], parsedHeader),
i, supported[i]]);
       };
       weighted.sort();
       return weighted[weighted.length-1][0][1] ? weighted[weighted.length-1][2] : '';
     }
-  }
+  };
   return publicMethods;
 })();

Modified: couchdb/trunk/share/server/render.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/render.js?rev=1037206&r1=1037205&r2=1037206&view=diff
==============================================================================
--- couchdb/trunk/share/server/render.js (original)
+++ couchdb/trunk/share/server/render.js Sat Nov 20 13:44:42 2010
@@ -105,7 +105,9 @@ var Mime = (function() {
     if (bestFun) {
       return bestFun();
     } else {
-      var supportedTypes = mimeFuns.map(function(mf) {return mimesByKey[mf[0]].join(', ')
|| mf[0]});
+      var supportedTypes = mimeFuns.map(function(mf) {
+        return mimesByKey[mf[0]].join(', ') || mf[0];
+      });
       throw(["error","not_acceptable",
         "Content-Type "+(accept||bestKey)+" not supported, try one of: "+supportedTypes.join(',
')]);
     }
@@ -117,7 +119,7 @@ var Mime = (function() {
     provides : provides,
     resetProvides : resetProvides,
     runProvides : runProvides
-  }  
+  };
 })();
 
 

Modified: couchdb/trunk/share/server/state.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/state.js?rev=1037206&r1=1037205&r2=1037206&view=diff
==============================================================================
--- couchdb/trunk/share/server/state.js (original)
+++ couchdb/trunk/share/server/state.js Sat Nov 20 13:44:42 2010
@@ -29,4 +29,4 @@ var State = {
     State.lib = lib;
     print("true");
   }
-}
+};

Modified: couchdb/trunk/share/server/util.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/util.js?rev=1037206&r1=1037205&r2=1037206&view=diff
==============================================================================
--- couchdb/trunk/share/server/util.js (original)
+++ couchdb/trunk/share/server/util.js Sat Nov 20 13:44:42 2010
@@ -21,7 +21,7 @@ var resolveModule = function(names, mod,
       parent : mod.parent,
       id : mod.id,
       exports : {}
-    }
+    };
   }
   // we need to traverse the path
   var n = names.shift();
@@ -72,12 +72,14 @@ var Couch = {
             var s = "function (module, exports, require) { " + newModule.current + " }";
             try {
               var func = sandbox ? evalcx(s, sandbox) : eval(s);
-              func.apply(sandbox, [newModule, newModule.exports, function(name) {return require(name,
newModule)}]);
+              func.apply(sandbox, [newModule, newModule.exports, function(name) {
+                return require(name, newModule);
+              }]);
             } catch(e) { 
               throw ["error","compilation_error","Module require('"+name+"') raised error
"+e.toSource()]; 
             }
             return newModule.exports;
-          }
+          };
           sandbox.require = require;
         }
         var functionObject = evalcx(source, sandbox);
@@ -103,7 +105,7 @@ var Couch = {
       }
     }
   }
-}
+};
 
 // prints the object as JSON, and rescues and logs any toJSON() related errors
 function respond(obj) {

Modified: couchdb/trunk/share/server/views.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/views.js?rev=1037206&r1=1037205&r2=1037206&view=diff
==============================================================================
--- couchdb/trunk/share/server/views.js (original)
+++ couchdb/trunk/share/server/views.js Sat Nov 20 13:44:42 2010
@@ -133,5 +133,5 @@ var Views = (function() {
       }
       print("[" + buf.join(", ") + "]");
     }
-  }
+  };
 })();



Mime
View raw message