All files / src/connect mapStateToProps.js

100% Statements 4/4
75% Branches 3/4
100% Functions 3/3
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 191x     32x           40x 8x                
import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps'
 
export function whenMapStateToPropsIsFunction(mapStateToProps) {
  return (typeof mapStateToProps === 'function')
    ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps')
    : undefined
}
 
export function whenMapStateToPropsIsMissing(mapStateToProps) {
  return (!mapStateToProps)
    ? wrapMapToPropsConstant(() => ({}))
    : undefined
}
 
export default [
  whenMapStateToPropsIsFunction,
  whenMapStateToPropsIsMissing
]