Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

pouch-summa

0.1.0 • Public • Published

Travis CI status

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'))

Install

npm i pouch-summa

DownloadsWeekly Downloads

2

Version

0.1.0

License

Apache-2.0

Last publish

Collaborators

  • avatar