lib/AttributeValue.js
function unwrap1(dynamoData) {
  var keys = Object.keys(dynamoData);
  if (keys.length !== 1)
    throw new Error('Unexpected DynamoDB AttributeValue');
  var typeStr = keys[0];
  if (!unwrapFns.hasOwnProperty(typeStr))
    throw errs.NoDatatype;
  var val = dynamoData[typeStr];
  return unwrapFns[typeStr] ? unwrapFns[typeStr](val) : val;
}
function unwrap1(dynamoData) {
  var keys = Object.keys(dynamoData);
  if (keys.length !== 1)
    throw new Error('Unexpected DynamoDB AttributeValue');
  var typeStr = keys[0];
  if (!unwrapFns.hasOwnProperty(typeStr))
    throw errs.NoDatatype;
  var val = dynamoData[typeStr];
  return unwrapFns[typeStr] ? unwrapFns[typeStr](val) : val;
}
function unwrap1 ( dynamoData ) { var keys = Object . keys ( dynamoData ) ; if ( keys . length !== 1 ) throw new Error ( 'Unexpected DynamoDB AttributeValue' ) ; var typeStr = keys [ 0 ] ; if ( ! unwrapFns . hasOwnProperty ( typeStr ) ) throw errs . NoDatatype ; var val = dynamoData [ typeStr ] ; return unwrapFns [ typeStr ] ? unwrapFns [ typeStr ] ( val ) : val ; }
Unwrap a single DynamoDB's AttributeValue to a value of the appropriate
javascript type.
@param {Object} attributeValue The DynamoDB AttributeValue.
@return {String|Number|Array}  The javascript value.
Unwrap a single DynamoDB s AttributeValue to a value of the appropriate javascript type .