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.1.8 to 0.1.9

6

nano.js

@@ -89,8 +89,8 @@ /* Minimal Couch In Node

request(req, function(e,h,b){
rh = h.headers;
status_code = h.statusCode;
if(e) {
callback(error.request_err(e,"socket",req,status_code),rh,b);
callback(error.request_err(e,"socket",req,status_code),{},b);
return;
}
rh = h.headers;
status_code = h.statusCode;
parsed = JSON.parse(b);

@@ -97,0 +97,0 @@ if (status_code === 200 || status_code === 201 || status_code === 202) {

{ "name": "nano"
, "description": "NanoCouch is a minimalistic driver for CouchDB built on mikeals/request"
, "homepage": "http://github.com/dscape/nano"
, "version": "0.1.8"
, "version": "0.1.9"
, "author": "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)"

@@ -6,0 +6,0 @@ , "keywords": ["CouchDB", "data", "request", "json", "nosql", "micro", "nano"]

# Nano
`nano` (short for NanoCouch) is a minimalistic `couchdb` driver for `node.js`.
`nano` (short for nanocouch) is a minimalistic `couchdb` driver for `node.js`.

@@ -20,3 +20,3 @@ ## Instalation

Because in `nano` you can do database operations you are not bound to one and only one database. The first thing you do is load the module pointing either providing a JSON configuration object or a string that represents the relative file path of that config, e.g. `cfg/tests.js`. Do refer to [cfg/couch.example.js][4] for a example. There you can use it to specify where `couchdb` lives, if you want to use `https`, or even to use a `proxy`.
Because in `nano` you can do database operations you are not bound to one and only one database. The first thing you do is load the module pointing either providing a `json` `configuration object` or a `configuration file path` like `cfg/tests.js`. Do refer to [cfg/couch.example.js][4] for a example. There you will also specify where `couchdb` lives, if you want to use `https`, or even to use a `proxy` server.

@@ -23,0 +23,0 @@ var nano = require('nano')('./cfg/tests.js');

@@ -21,4 +21,4 @@ var vows = require('/usr/lib/node_modules/vows/lib/vows')

db.compact(function () {
db.info(function(e,h,b) {
callback(null,b);
db.info(function(e,_,b) {
callback(e,b);
return;

@@ -33,2 +33,3 @@ });

nano.db.destroy("db_co1");
assert.isNull(err);
assert.equal(list.doc_count, 3);

@@ -35,0 +36,0 @@ assert.equal(list.doc_del_count, 0);

@@ -13,3 +13,3 @@ var vows = require('/usr/lib/node_modules/vows/lib/vows')

nano.db.create(db_name, function () {
db.insert("foo", {foo: "bar"}, function (e,h,b) {
db.insert("foo", {foo: "bar"}, function (_,_,b) {
db.destroy("foo", b.rev, function (e,h,b) {

@@ -16,0 +16,0 @@ callback(e,h,b);

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