docs-db
v0.0.6
Published
Simple docs database with history support.
Downloads
14
Readme
docs-db
Simple docs database with history support.
Install
$ npm install docs-db
Usage
const DocsDb = require("docs-db")
const db = new DocsDb()
API
DocsDb([data])
data
Type: object
with db
and history
keys
const DocsDb = require("docs-db")
const db = new DocsDb()
db.export
Export the whole content with history in an object with db
and history
keys. You can pass the result to the constructor to initialize it with content.
db.historyCount
db.docCount
db.docIds
db.docMetas
db.sizeCurrent
db.sizeHistory
db.size
db.getDoc(_id, [_rev])
db.deleteDoc(_id, currentRev)
db.revertDoc(_id, currentRev, [to])
db.updateDoc(newDoc, [currentRev])
License
AGPL-v3 © 2018 Robin Millette