lib/patch-builder.js
function addMetadataValue(name, value) {
  if (typeof name !== 'string' || typeof value !== 'string' ) {
    throw new Error('metadataValues.add() takes a string name and string value');
  }
  var metaVal = {};
  metaVal[name] = value;
  return insert('/object-node("metadataValues")', 'last-child', metaVal);
}
function addMetadataValue(name, value) {
  if (typeof name !== 'string' || typeof value !== 'string' ) {
    throw new Error('metadataValues.add() takes a string name and string value');
  }
  var metaVal = {};
  metaVal[name] = value;
  return insert('/object-node("metadataValues")', 'last-child', metaVal);
}
function addMetadataValue ( name , value ) { if ( typeof name !== 'string' || typeof value !== 'string' ) { throw new Error ( 'metadataValues.add() takes a string name and string value' ) ; } var metaVal = { } ; metaVal [ name ] = value ; return insert ( '/object-node("metadataValues")' , 'last-child' , metaVal ) ; }
Specifies operations to patch the metadata values of a document.
@namespace patchBuilderMetadataValues
@since 2.0.1
 
Specifies a new metadata value to add to a document.
@method patchBuilderMetadataValues#add
@since 2.0.1
@param {string} name - the name of the new metadata value
@param value - the value of the new metadata value
@returns {patchBuilder.PatchOperation} a patch operation
Specifies operations to patch the metadata values of a document .