mapStateToProps.js 750 B

123456789101112131415161718192021
  1. "use strict";
  2. exports.__esModule = true;
  3. exports["default"] = void 0;
  4. exports.whenMapStateToPropsIsFunction = whenMapStateToPropsIsFunction;
  5. exports.whenMapStateToPropsIsMissing = whenMapStateToPropsIsMissing;
  6. var _wrapMapToProps = require("./wrapMapToProps");
  7. function whenMapStateToPropsIsFunction(mapStateToProps) {
  8. return typeof mapStateToProps === 'function' ? (0, _wrapMapToProps.wrapMapToPropsFunc)(mapStateToProps, 'mapStateToProps') : undefined;
  9. }
  10. function whenMapStateToPropsIsMissing(mapStateToProps) {
  11. return !mapStateToProps ? (0, _wrapMapToProps.wrapMapToPropsConstant)(function () {
  12. return {};
  13. }) : undefined;
  14. }
  15. var _default = [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];
  16. exports["default"] = _default;