Code coverage report for es6/unmarshalItem.js

Statements: 100% (11 / 11)      Branches: 100% (4 / 4)      Functions: 100% (2 / 2)      Lines: 100% (3 / 3)      Ignored: 1 branch     

All files » es6/ » unmarshalItem.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16                    1 3        
import ensureItemIsObject from './lib/ensureItemIsObject';
import unmarshal from './unmarshal';
 
/**
 * Translates a DynamoDb formatted object (a response from DynamoDb sdk) into
 * a plain javascript object with DynamoDb AttributeValue objects.
 *
 * @param {Object} item DynamoDb formatted object.
 * @returns {Object} A javascript object in normal form.
 */
function unmarshalItem(item) {
  return unmarshal({M: item});
}
 
export default ensureItemIsObject(unmarshalItem);