Socket
Socket
Sign inDemoInstall

nano

Package Overview
Dependencies
Maintainers
1
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 0.9.4 to 0.9.5

19

nano.js

@@ -124,3 +124,3 @@ /* minimal couch in node

if(cfg.cookie){
req.headers["cookie"] = cfg.cookie;
req.headers.cookie = cfg.cookie;
}

@@ -160,3 +160,8 @@ if(!_.isEmpty(params)) {

} catch(exc) {
callback ? callback(error.uncaught(exc)) : console.error(exc);
if (callback) {
callback(error.uncaught(exc));
}
else {
console.error(exc);
}
}

@@ -196,3 +201,3 @@ }

*
* e.g. nano.db.delete(db_name);
* e.g. nano.db.destroy(db_name);
*

@@ -315,9 +320,9 @@ * even though this examples looks sync it is an async function

/*
* deletes session
* destroy session
*
* e.g. nano.session.delete()
* e.g. nano.session.destroy()
*
* @see relax
*/
function delete_session(callback) {
function destroy_session(callback) {
cfg.cookie = null; //make sure cookie gets destroyed also if error

@@ -552,3 +557,3 @@ return relax({db: "_session", method: "DELETE"}, callback);

, session: { create: create_session
, delete: delete_session
, destroy: destroy_session
}

@@ -555,0 +560,0 @@ , use: document_module

@@ -5,3 +5,3 @@ { "name" : "nano"

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

@@ -8,0 +8,0 @@ , "contributors" :

@@ -12,6 +12,2 @@ # nano

a quick example using `nano`
to use `nano` you have to either provide a) a `json` `configuration object`, b) a `url` string, or c) a `configuration file path` like `cfg/tests.js`. refer to [cfg/couch.example.js][4] for a example
``` js

@@ -66,3 +62,3 @@ var nano = require('nano')('http://localhost:5984');

that's it. don't forget to delete the database you created:
errors include responses from couchdb which had a non-200 response code. that's it. don't forget to delete the database you created:

@@ -69,0 +65,0 @@ ``` js

@@ -17,3 +17,3 @@ var ensure = require('ensure')

nano.session.create('pat', '123', function(){
nano.session.delete(function(e,b,h){
nano.session.destroy(function(e,b,h){
callback(e,user.rev,b,h);

@@ -30,5 +30,5 @@ });

this.t.equal(headers['set-cookie'][0].length, 41);
this.t.equal(response['ok'], true); // response tests go here
this.t.equal(response.ok, true); // response tests go here
};
ensure(__filename,tests,module,process.argv[2]);
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