pouch-summa
v0.1.0
Published
Makes PouchDB deal better with databases synced from SummaDB.
Downloads
1
Maintainers
Readme
Before, you would see your documents as
{
"name": {
"_val": "Kalualualeiamba"
},
"items": {
"on hand": {
"cane": {
"_val": 1
}
},
"on pocket": {
"red potion": {
"_val": 7
},
"napkin": {
"_val": 12
}
}
}
}
Now you'll have them as
{
"name": "Kalualualeiamba",
"items": {
"on hand": {
"cane": 1
},
"on pocket": {
"red potion": 7,
"napkin": 12
}
}
}
and you can modify properties and save the document again, without ever thinking about the _val
again.
Install
npm install --save transform-pouch
npm install --save pouch-summa
Usage
var PouchDB = require('pouchdb')
PouchDB.plugin(require('transform-pouch'))
var db = new PouchDB('this-syncs-with-summadb')
db.transform(require('pouch-summa'))