Socket
Socket
Sign inDemoInstall

nano

Package Overview
Dependencies
Maintainers
3
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nano - npm Package Compare versions

Comparing version 6.0.1 to 6.0.2

7

lib/nano.js

@@ -557,3 +557,3 @@ 'use strict';

att.data.length : Buffer.byteLength(att.data),
contentType: att.contentType
'content_type': att.contentType
};

@@ -722,6 +722,7 @@ multipart.push({body: att.data});

var pathArray = path.pathname.split('/').filter(function(e) { return e; });
var db = path.pathname && pathArray[0];
var db = pathArray.pop();
var rootPath = path.pathname.replace(/\/?$/, '/..');
if (db) {
cfg.url = cfg.url.replace('/' + db, '');
cfg.url = u.resolve(cfg.url, rootPath).replace(/\/?$/, '');
return docModule(db);

@@ -728,0 +729,0 @@ }

@@ -7,3 +7,3 @@ {

"repository": "git://github.com/dscape/nano",
"version": "6.0.1",
"version": "6.0.2",
"author": "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)",

@@ -10,0 +10,0 @@ "keywords": [

@@ -160,3 +160,3 @@ [![By](https://img.shields.io/badge/made%20by-yld!-32bbee.svg?style=flat-square)](http://yld.io/contact?source=github-nano)[![Chat](https://img.shields.io/badge/help-gitter-eb9348.svg?style=flat-square)](https://gitter.im/dscape/nano)[![Tests](http://img.shields.io/travis/dscape/nano.svg?style=flat-square)](https://travis-ci.org/dscape/nano)![Coverage](https://img.shields.io/badge/coverage-100%-ff69b4.svg?style=flat-square)[![Dependencies](https://img.shields.io/david/dscape/nano.svg?style=flat-square)](https://david-dm.org/dscape/nano)[![NPM](http://img.shields.io/npm/v/nano.svg?style=flat-square)](http://browsenpm.org/package/nano)

{ "url" : "http://localhost:5984/foo"
, "request_defaults" : { "proxy" : "http://someproxy" }
, "requestDefaults" : { "proxy" : "http://someproxy" }
, "log" : function (id, args) {

@@ -171,3 +171,3 @@ console.log(id, args);

a very important configuration parameter if you have a high traffic website and are using nano is setting up the `pool.size`. by default, the node.js http global agent (client) has a certain size of active connections that can run simultaneously, while others are kept in a queue. pooling can be disabled by setting the `agent` property in `request_defaults` to false, or adjust the global pool size using:
a very important configuration parameter if you have a high traffic website and are using nano is setting up the `pool.size`. by default, the node.js http global agent (client) has a certain size of active connections that can run simultaneously, while others are kept in a queue. pooling can be disabled by setting the `agent` property in `requestDefaults` to false, or adjust the global pool size using:

@@ -178,3 +178,3 @@ ``` js

you can also increase the size in your calling context using `request_defaults` if this is problematic. refer to the [request] documentation and examples for further clarification.
you can also increase the size in your calling context using `requestDefaults` if this is problematic. refer to the [request] documentation and examples for further clarification.

@@ -193,3 +193,3 @@ here's an example explicitly using the keep alive agent (installed using `npm install agentkeepalive`), especially useful to limit your open sockets when doing high-volume access to couchdb on localhost:

{ "url" : "http://localhost:5984/foo"
, "request_defaults" : { "agent" : myagent }
, "requestDefaults" : { "agent" : myagent }
});

@@ -196,0 +196,0 @@ ```

@@ -53,2 +53,17 @@ 'use strict';

assert.equal(
Nano('http://a:b%20c%3F@someurl.com:5984/my%2Fdb').config.url,
'http://a:b%20c%3F@someurl.com:5984',
'with dbname containing encoded slash');
assert.equal(
Nano('http://mydb-a:b%20c%3F@someurl.com:5984/mydb').config.url,
'http://mydb-a:b%20c%3F@someurl.com:5984',
'with repeating dbname');
assert.equal(
Nano('http://a:b%20c%3F@someurl.com:5984/prefix/mydb').config.url,
'http://a:b%20c%3F@someurl.com:5984/prefix',
'with subdir');
assert.equal(
Nano(baseUrl + ':5984/a').config.url,

@@ -55,0 +70,0 @@ baseUrl + ':5984',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc