GT2/GT2-iOS/node_modules/react-redux/es/connect/mapStateToProps.js

13 lines
507 B
JavaScript
Raw Normal View History

2018-02-12 17:26:06 +00:00
import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';
export function whenMapStateToPropsIsFunction(mapStateToProps) {
return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;
}
export function whenMapStateToPropsIsMissing(mapStateToProps) {
return !mapStateToProps ? wrapMapToPropsConstant(function () {
return {};
}) : undefined;
}
export default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];