tillre / nano-option

Create a nano adapter if option is not already a nano adapter. Also set `X-Couch-Full-Commit` header.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nano-option

Create a nano adapter if option is not already a nano adapter. Also set X-Couch-Full-Commit header.

Build Status

Used for the couchdb-bootstrap suite.

Usage

var nanoOption = require('nano-option')

// This is all equivalent:
nanoOption('http://localhost:5984/mydb')
nanoOption(require('nano')('http://localhost:5984/mydb'))
nanoOption({
  url: 'http://localhost:5984/mydb',
  requestDefaults: {
    proxy: 'http://someproxy'
  }
})

Tests

npm test

About

Create a nano adapter if option is not already a nano adapter. Also set `X-Couch-Full-Commit` header.


Languages

Language:JavaScript 100.0%