@@ -73,16 +73,36 @@ return /******/ (function(modules) { // webpackBootstrap
73
73
74
74
var _react2 = _interopRequireDefault ( _react ) ;
75
75
76
- var _functions = __webpack_require__ ( ! ( function webpackMissingModule ( ) { var e = new Error ( "Cannot find module \"./functions\"" ) ; e . code = 'MODULE_NOT_FOUND' ; throw e ; } ( ) ) ) ;
76
+ // @todo Where to get these from?
77
+ var isFunction = function isFunction ( x ) {
78
+ return typeof x === 'function' ;
79
+ } ;
80
+ var eachObject = function eachObject ( f , o ) {
81
+ o . forEach ( function ( from ) {
82
+ Object . keys ( Object ( from ) ) . forEach ( function ( key ) {
83
+ f ( key , from [ key ] ) ;
84
+ } ) ;
85
+ } ) ;
86
+ } ;
87
+ var assign = function assign ( target ) {
88
+ for ( var _len = arguments . length , source = Array ( _len > 1 ? _len - 1 : 0 ) , _key = 1 ; _key < _len ; _key ++ ) {
89
+ source [ _key - 1 ] = arguments [ _key ] ;
90
+ }
91
+
92
+ eachObject ( function ( key , value ) {
93
+ return target [ key ] = value ;
94
+ } , source ) ;
95
+ return target ;
96
+ } ;
77
97
78
98
function connectToStores ( Spec ) {
79
99
var Component = arguments [ 1 ] === undefined ? Spec : arguments [ 1 ] ;
80
100
return ( function ( ) {
81
101
// Check for required static methods.
82
- if ( ! ( 0 , _functions . isFunction ) ( Spec . getStores ) ) {
102
+ if ( ! isFunction ( Spec . getStores ) ) {
83
103
throw new Error ( 'connectToStores() expects the wrapped component to have a static getStores() method' ) ;
84
104
}
85
- if ( ! ( 0 , _functions . isFunction ) ( Spec . getPropsFromStores ) ) {
105
+ if ( ! isFunction ( Spec . getPropsFromStores ) ) {
86
106
throw new Error ( 'connectToStores() expects the wrapped component to have a static getPropsFromStores() method' ) ;
87
107
}
88
108
@@ -120,7 +140,7 @@ return /******/ (function(modules) { // webpackBootstrap
120
140
} ,
121
141
122
142
render : function render ( ) {
123
- return _react2 [ 'default' ] . createElement ( Component , ( 0 , _functions . assign ) ( { } , this . props , this . state ) ) ;
143
+ return _react2 [ 'default' ] . createElement ( Component , assign ( { } , this . props , this . state ) ) ;
124
144
}
125
145
} ) ;
126
146
0 commit comments