Code coverage report for dynamoDb-marshaler/lib/commands/unmarshalPassThrough.js

Statements: 100% (8 / 8)      Branches: 100% (2 / 2)      Functions: 100% (2 / 2)      Lines: 100% (8 / 8)      Ignored: none     

All files » dynamoDb-marshaler/lib/commands/ » unmarshalPassThrough.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18    1   1 6   6 20     6 1     5    
'use strict';
 
var _ = require('lodash');
 
module.exports = function(item) {
  var typeList = ['S', 'SS', 'B', 'BS', 'BOOL'];
 
  var key = _.find(typeList, function(type) {
    return _.has(item, type);
  });
 
  if (!key) {
    return undefined;
  }
 
  return item[key];
};