All files / src/connect mapSendToProps.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 19 201x     9x           40x 30x                  
import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps'
 
export function whenMapSendToPropsIsFunction(mapSendToProps) {
  return (typeof mapSendToProps === 'function')
    ? wrapMapToPropsFunc(mapSendToProps)
    : undefined
}
 
export function whenMapSendToPropsIsMissing(mapSendToProps) {
  return (!mapSendToProps)
    ? wrapMapToPropsConstant(send => ({ send }))
    : undefined
}
 
 
export default [
  whenMapSendToPropsIsFunction,
  whenMapSendToPropsIsMissing,
]