nano-option

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

Usage no npm install needed!

<script type="module">
  import nanoOption from 'https://cdn.skypack.dev/nano-option';
</script>

README

nano-option

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

Used within 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