mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-25 14:59:16 +01:00
10 lines
504 B
JavaScript
Vendored
10 lines
504 B
JavaScript
Vendored
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]; |