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

Statements: 100% (5 / 5)      Branches: 100% (6 / 6)      Functions: 100% (1 / 1)      Lines: 100% (5 / 5)      Ignored: none     

All files » dynamoDb-marshaler/lib/commands/ » marshalStringSet.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17    1   1 5           4     1    
'use strict';
 
var _ = require('lodash');
 
module.exports = function(item) {
  if (
    !_.isArray(item) ||
    _.isEmpty(item) ||
    !_.every(item, _.isString) ||
    _.uniq(item).length !== item.length
  ) {
    return undefined;
  }
 
  return {SS: item};
};