0.1.0 • Published 8 years ago

pouch-summa v0.1.0

Weekly downloads
5
License
Apache-2.0
Repository
github
Last release
8 years ago

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

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago