Skip to content

Commit 127a45c

Browse files
committed
Document the options to db.create()
In the source code, the `createDb()` function accepts an options object but this is not documented. The `PUT /{db}` endpoint [1] does have some query string options and `nano` users should be able to make use of them. [1]: https://docs.couchdb.org/en/stable/api/database/common.html#put--db
1 parent c84d0a4 commit 127a45c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,12 @@ db.insert(p).then((response) => {
296296

297297
## Database functions
298298

299-
### nano.db.create(name, [callback])
299+
### nano.db.create(name, [opts], [callback])
300300

301-
Creates a CouchDB database with the given `name`:
301+
Creates a CouchDB database with the given `name`, with options `opts`.
302302

303303
```js
304-
await nano.db.create('alice')
304+
await nano.db.create('alice', { n: 3 })
305305
```
306306

307307
### nano.db.get(name, [callback])

0 commit comments

Comments
 (0)