dynamodb-doc-client-utils.js
function updateExpressionAttributeNames(opts, expressionAttributeNames) {
  if (!expressionAttributeNames || typeof expressionAttributeNames !== 'object') return opts;
  if (!opts) opts = {};
  if (!opts.ExpressionAttributeNames) opts.ExpressionAttributeNames = {};

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

  return opts;
}
function updateExpressionAttributeNames(opts, expressionAttributeNames) {
  if (!expressionAttributeNames || typeof expressionAttributeNames !== 'object') return opts;
  if (!opts) opts = {};
  if (!opts.ExpressionAttributeNames) opts.ExpressionAttributeNames = {};

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

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