findAll
function
findAll()
Option name | Type | Description |
---|---|---|
[filter] | Function | Function returning |
return | Promise |
finds all existing objects in local database.
function findAll (filter) {
return this.allDocs({
include_docs: true
})
.then(function (res) {
var objects = res.rows
.filter(isntDesignDoc)
.map(function (row) {
return toObject(row.doc)
})
return typeof filter === 'function'
? objects.filter(filter)
: objects
})
}