dynamodb-doc-client-utils.js
function updateExpressionAttributeValues(opts, expressionAttributeValues) {
  if (!expressionAttributeValues || typeof expressionAttributeValues !== 'object') return opts;
  if (!opts) opts = {};
  if (!opts.ExpressionAttributeValues) opts.ExpressionAttributeValues = {};

  const keys = Object.getOwnPropertyNames(expressionAttributeValues);
  keys.forEach(key => {
    opts.ExpressionAttributeValues[key] = expressionAttributeValues[key];
  });

  return opts;
}
function updateExpressionAttributeValues(opts, expressionAttributeValues) {
  if (!expressionAttributeValues || typeof expressionAttributeValues !== 'object') return opts;
  if (!opts) opts = {};
  if (!opts.ExpressionAttributeValues) opts.ExpressionAttributeValues = {};

  const keys = Object.getOwnPropertyNames(expressionAttributeValues);
  keys.forEach(key => {
    opts.ExpressionAttributeValues[key] = expressionAttributeValues[key];
  });

  return opts;
}
function updateExpressionAttributeValues ( opts , expressionAttributeValues ) { if ( ! expressionAttributeValues || typeof expressionAttributeValues !== 'object' ) return opts ; if ( ! opts ) opts = { } ; if ( ! opts . ExpressionAttributeValues ) opts . ExpressionAttributeValues = { } ; const keys = Object . getOwnPropertyNames ( expressionAttributeValues ) ; keys . forEach ( key => { opts . ExpressionAttributeValues [ key ] = expressionAttributeValues [ key ] ; } ) ; return opts ; }
Updates the ExpressionAttributeValues map of the given opts with the given map of extra expression attribute names.
@param {DynamoQueryOpts|Object|undefined} opts - the options to update
@param {Object.<string, string>} expressionAttributeValues - the map of extra expression attribute names to add
@return {DynamoQueryOpts|Object} the updated options
Updates the ExpressionAttributeValues map of the given opts with the given map of extra expression attribute names .