UNPKG

data-provider-temporary

Version:

Library that helps with server-to-client synchronization of data

19 lines (15 loc) 508 B
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 ]