By default mongodown will store the level value in the "value" property. If you need to save additional data with mongo document then you can do that with "extraFields" option. Extra field value can be derived from key and value of "put" operations.
This will add timestamp key to mongo document on put:
var db = levelup(mongodown('localhost/my-database'), {
extraFields: {
timestamp: function (k,v) { return Date.now() }
}
})
By default mongodown will store the level value in the "value" property. If you need to save additional data with mongo document then you can do that with "extraFields" option. Extra field value can be derived from key and value of "put" operations.
This will add
timestamp
key to mongo document onput
: