All files hasComplex.js

100% Statements 6/6
100% Branches 0/0
100% Functions 5/5
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18    17x   17x     35x   35x   30x 81x          
function hasComplex(props) {
  // reflect types in the documentation if changed
  const quicks = [ 'string', 'number', 'undefined', 'boolean', 'symbol' ]
 
  return !!Object
    .keys(props)
    .filter( function(key) {
      return Object.prototype.hasOwnProperty.call(props, key)
    })
    .map( function(key){ return props[key] } )
    .find( function(prop) {
      return !quicks.find( function(quickTypeName) {
        return typeof(prop) === quickTypeName
      })
    })
}
 
export default hasComplex