Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes #135

  • Loading branch information...
commit 1af286136b2d6f316e14c9828e365439a09071b8 1 parent 8978f69
@dscape authored
Showing with 7 additions and 12 deletions.
  1. +2 −1  .travis.yml
  2. +3 −9 nano.js
  3. +2 −2 package.json
View
3  .travis.yml
@@ -7,4 +7,5 @@ node_js:
- 0.4
- 0.6
- 0.8
- - 0.9
+ - 0.10
+ - 0.11
View
12 nano.js
@@ -18,20 +18,14 @@ var request = require('request').defaults({ jar: false })
, fs = require('fs')
, qs = require('querystring')
, u = require('url')
- , extend = require('extend')
, errs = require('errs')
+ , _ = require('underscore')
, follow
, nano
;
try { follow = require('follow'); } catch (err) {}
-function isEmpty(object) {
- for(var property in object) {
- if(object.hasOwnProperty(property)) return false; }
- return true;
-}
-
/*
* nano is a library that helps you building requests to couchdb
* that is built on top of mikeal/request
@@ -106,7 +100,7 @@ module.exports = exports = nano = function database_module(cfg) {
}
var log = logging()
- , params = extend({}, opts.params)
+ , params = _.extend({}, opts.params)
, headers = { "content-type": "application/json"
, "accept" : "application/json"
}
@@ -187,7 +181,7 @@ module.exports = exports = nano = function database_module(cfg) {
}
// these need to be encoded
- if(!isEmpty(opts.params)) {
+ if(!_.isEmpty(opts.params)) {
try {
['startkey', 'endkey', 'key', 'keys'].forEach(function (key) {
if (key in opts.params) {
View
4 package.json
@@ -34,10 +34,10 @@
, "keywords" :
["couchdb", "data", "request", "json", "nosql", "micro", "nano", "database"]
, "dependencies" :
- { "request" : "2.12.x"
+ { "request" : "2.16.x"
, "follow" : "0.8.x"
, "errs" : "0.2.x"
- , "extend" : "1.1.x"
+ , "underscore" : "1.4.x"
}
, "devDependencies" :
{ "async" : "0.1.x"
Please sign in to comment.
Something went wrong with that request. Please try again.