Permalink
Browse files

lowercase startkey, endkey to work, add option to pass hash of option…

…s so that limit, skip can be supported too.
  • Loading branch information...
1 parent f6df591 commit 5190ae6cf391da74e9fbfe087f03edc644f5779c @pagameba pagameba committed Mar 1, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 couch-ar.js
View
@@ -141,8 +141,10 @@ exports.create = function(name, config, constr) {
function executeView(viewName, value, callback) {
var options = {};
if (Array.isArray(value)) {
- options.startKey = JSON.stringify(value[0]);
- options.endKey = JSON.stringify(value[1]);
+ options.startkey = JSON.stringify(value[0]);
+ options.endkey = JSON.stringify(value[1]);
+ } else if (typeof(value) = 'object'){
+ options = value;
} else {
options.key = JSON.stringify(value);
}

0 comments on commit 5190ae6

Please sign in to comment.