lib/services/metadata.js
function changeMetaState(uri, update) {
  return getMeta(uri)
    .then(old => mergeNewAndOldMeta(old, update))
    .then(updatedMeta => putMeta(uri, updatedMeta));
}
function changeMetaState(uri, update) {
  return getMeta(uri)
    .then(old => mergeNewAndOldMeta(old, update))
    .then(updatedMeta => putMeta(uri, updatedMeta));
}
function changeMetaState ( uri , update ) { return getMeta ( uri ) . then ( old => mergeNewAndOldMeta ( old , update ) ) . then ( updatedMeta => putMeta ( uri , updatedMeta ) ) ; }
Given a uri and an object that is an
update, retreive the old meta, merge
the new and old and then put the merge
to the db.

@param {String} uri
@param {Object} update
@returns {Promise}
Given a uri and an object that is an update retreive the old meta merge the new and old and then put the merge to the db .