1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory();
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define("AstxReduxUtil", [], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["AstxReduxUtil"] = factory();
|
8 | else
|
9 | root["AstxReduxUtil"] = factory();
|
10 | })(this, function() {
|
11 | return /******/ (function(modules) { // webpackBootstrap
|
12 | /******/ // The module cache
|
13 | /******/ var installedModules = {};
|
14 | /******/
|
15 | /******/ // The require function
|
16 | /******/ function __webpack_require__(moduleId) {
|
17 | /******/
|
18 | /******/ // Check if module is in cache
|
19 | /******/ if(installedModules[moduleId])
|
20 | /******/ return installedModules[moduleId].exports;
|
21 | /******/
|
22 | /******/ // Create a new module (and put it into the cache)
|
23 | /******/ var module = installedModules[moduleId] = {
|
24 | /******/ i: moduleId,
|
25 | /******/ l: false,
|
26 | /******/ exports: {}
|
27 | /******/ };
|
28 | /******/
|
29 | /******/ // Execute the module function
|
30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 | /******/
|
32 | /******/ // Flag the module as loaded
|
33 | /******/ module.l = true;
|
34 | /******/
|
35 | /******/ // Return the exports of the module
|
36 | /******/ return module.exports;
|
37 | /******/ }
|
38 | /******/
|
39 | /******/
|
40 | /******/ // expose the modules object (__webpack_modules__)
|
41 | /******/ __webpack_require__.m = modules;
|
42 | /******/
|
43 | /******/ // expose the module cache
|
44 | /******/ __webpack_require__.c = installedModules;
|
45 | /******/
|
46 | /******/ // identity function for calling harmony imports with the correct context
|
47 | /******/ __webpack_require__.i = function(value) { return value; };
|
48 | /******/
|
49 | /******/ // define getter function for harmony exports
|
50 | /******/ __webpack_require__.d = function(exports, name, getter) {
|
51 | /******/ if(!__webpack_require__.o(exports, name)) {
|
52 | /******/ Object.defineProperty(exports, name, {
|
53 | /******/ configurable: false,
|
54 | /******/ enumerable: true,
|
55 | /******/ get: getter
|
56 | /******/ });
|
57 | /******/ }
|
58 | /******/ };
|
59 | /******/
|
60 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
61 | /******/ __webpack_require__.n = function(module) {
|
62 | /******/ var getter = module && module.__esModule ?
|
63 | /******/ function getDefault() { return module['default']; } :
|
64 | /******/ function getModuleExports() { return module; };
|
65 | /******/ __webpack_require__.d(getter, 'a', getter);
|
66 | /******/ return getter;
|
67 | /******/ };
|
68 | /******/
|
69 | /******/ // Object.prototype.hasOwnProperty.call
|
70 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
71 | /******/
|
72 | /******/ // __webpack_public_path__
|
73 | /******/ __webpack_require__.p = "";
|
74 | /******/
|
75 | /******/ // Load entry module and return exports
|
76 | /******/ return __webpack_require__(__webpack_require__.s = 7);
|
77 | /******/ })
|
78 | /************************************************************************/
|
79 | /******/ ([
|
80 | /* 0 */
|
81 | /***/ (function(module, exports, __webpack_require__) {
|
82 |
|
83 | ;
|
84 |
|
85 |
|
86 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
87 |
|
88 | /**
|
89 | * lodash 3.0.8 (Custom Build) <https://lodash.com/>
|
90 | * Build: `lodash modularize exports="npm" -o ./`
|
91 | * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
92 | * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
93 | * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
94 | * Available under MIT license <https://lodash.com/license>
|
95 | */
|
96 |
|
97 | /** `Object#toString` result references. */
|
98 | var funcTag = '[object Function]',
|
99 | genTag = '[object GeneratorFunction]';
|
100 |
|
101 | /** Used for built-in method references. */
|
102 | var objectProto = Object.prototype;
|
103 |
|
104 | /**
|
105 | * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
106 | * of values.
|
107 | */
|
108 | var objectToString = objectProto.toString;
|
109 |
|
110 | /**
|
111 | * Checks if `value` is classified as a `Function` object.
|
112 | *
|
113 | * @static
|
114 | * @memberOf _
|
115 | * @category Lang
|
116 | * @param {*} value The value to check.
|
117 | * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
118 | * @example
|
119 | *
|
120 | * _.isFunction(_);
|
121 | * // => true
|
122 | *
|
123 | * _.isFunction(/abc/);
|
124 | * // => false
|
125 | */
|
126 | function isFunction(value) {
|
127 | // The use of `Object#toString` avoids issues with the `typeof` operator
|
128 | // in Safari 8 which returns 'object' for typed array constructors, and
|
129 | // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
130 | var tag = isObject(value) ? objectToString.call(value) : '';
|
131 | return tag == funcTag || tag == genTag;
|
132 | }
|
133 |
|
134 | /**
|
135 | * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
136 | * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
137 | *
|
138 | * @static
|
139 | * @memberOf _
|
140 | * @category Lang
|
141 | * @param {*} value The value to check.
|
142 | * @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
143 | * @example
|
144 | *
|
145 | * _.isObject({});
|
146 | * // => true
|
147 | *
|
148 | * _.isObject([1, 2, 3]);
|
149 | * // => true
|
150 | *
|
151 | * _.isObject(_.noop);
|
152 | * // => true
|
153 | *
|
154 | * _.isObject(null);
|
155 | * // => false
|
156 | */
|
157 | function isObject(value) {
|
158 | var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);
|
159 | return !!value && (type == 'object' || type == 'function');
|
160 | }
|
161 |
|
162 | module.exports = isFunction;
|
163 |
|
164 | /***/ }),
|
165 | /* 1 */
|
166 | /***/ (function(module, exports, __webpack_require__) {
|
167 |
|
168 | ;
|
169 |
|
170 |
|
171 | exports.__esModule = true;
|
172 | exports.default = verify;
|
173 | /**
|
174 | * A convenience assertion utility, typically used to validate
|
175 | * pre-conditions of a routine.
|
176 | *
|
177 | * **Advanced**: verify.prefix(msgPrefix) returns a higher-order
|
178 | * verify() function where all messaged are prefixed.
|
179 | *
|
180 | * @param {truthy} condition - a "truthy" condition which
|
181 | * must be satisfied.
|
182 | *
|
183 | * @param {string} msg - a message clarifying the condition being
|
184 | * checked.
|
185 | *
|
186 | * @throws {Error} an Error is thrown when the supplied condition is
|
187 | * NOT met.
|
188 | *
|
189 | * @private
|
190 | */
|
191 | function verify(condition, msg) {
|
192 | if (!condition) {
|
193 | throw new Error(msg);
|
194 | }
|
195 | }
|
196 |
|
197 | verify.prefix = function (msgPrefix) {
|
198 | return function (condition, msg) {
|
199 | return verify(condition, msgPrefix + msg);
|
200 | };
|
201 | };
|
202 |
|
203 | /***/ }),
|
204 | /* 2 */
|
205 | /***/ (function(module, exports, __webpack_require__) {
|
206 |
|
207 | ;
|
208 |
|
209 |
|
210 | /**
|
211 | * lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
212 | * Build: `lodash modern modularize exports="npm" -o ./`
|
213 | * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
214 | * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
215 | * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
216 | * Available under MIT license <https://lodash.com/license>
|
217 | */
|
218 |
|
219 | /**
|
220 | * This method returns the first argument provided to it.
|
221 | *
|
222 | * @static
|
223 | * @memberOf _
|
224 | * @category Utility
|
225 | * @param {*} value Any value.
|
226 | * @returns {*} Returns `value`.
|
227 | * @example
|
228 | *
|
229 | * var object = { 'user': 'fred' };
|
230 | * _.identity(object) === object;
|
231 | * // => true
|
232 | */
|
233 | function identity(value) {
|
234 | return value;
|
235 | }
|
236 |
|
237 | module.exports = identity;
|
238 |
|
239 | /***/ }),
|
240 | /* 3 */
|
241 | /***/ (function(module, exports, __webpack_require__) {
|
242 |
|
243 | ;
|
244 |
|
245 |
|
246 | exports.__esModule = true;
|
247 | exports.default = conditionalReducer;
|
248 |
|
249 | var _lodash = __webpack_require__(2);
|
250 |
|
251 | var _lodash2 = _interopRequireDefault(_lodash);
|
252 |
|
253 | var _lodash3 = __webpack_require__(0);
|
254 |
|
255 | var _lodash4 = _interopRequireDefault(_lodash3);
|
256 |
|
257 | var _verify = __webpack_require__(1);
|
258 |
|
259 | var _verify2 = _interopRequireDefault(_verify);
|
260 |
|
261 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
262 |
|
263 | /**
|
264 | * Create a higher-order reducer that conditionally executes one of
|
265 | * the supplied reducerFns, based on the conditionalFn() return
|
266 | * directive.
|
267 | *
|
268 | * The {{book.guide.devGuide}} discusses conditionalReducer() in more detail
|
269 | * (see {{book.guide.conceptConditional}}), and additional examples can
|
270 | * be found in {{book.guide.conceptJoin}} and {{book.guide.fullExample}}.
|
271 | *
|
272 | * @param {conditionalReducerCB} conditionalFn - a callback function
|
273 | * whose return value determines which reducerFn is executed
|
274 | * ... truthy: thenReducerFn(), falsy: elseReducerFn().
|
275 | *
|
276 | * @param {reducerFn} thenReducerFn - the "wrapped" reducer invoked
|
277 | * when conditionalFn returns truthy.
|
278 | *
|
279 | * @param {reducerFn} [elseReducerFn=identity] - the
|
280 | * optional "wrapped" reducer invoked when conditionalFn returns
|
281 | * falsy. DEFAULT: [identity function](https://lodash.com/docs#identity)
|
282 | *
|
283 | * @param {InitialState} [initialState] - the optional fall-back state
|
284 | * value used during the state initialization boot-strap process.
|
285 | *
|
286 | * @returns {reducerFn} a newly created reducer function (described above).
|
287 | */
|
288 | function conditionalReducer(conditionalFn, thenReducerFn) {
|
289 | var elseReducerFn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _lodash2.default;
|
290 | var initialState = arguments[3];
|
291 |
|
292 |
|
293 | // validate params
|
294 | var check = _verify2.default.prefix('AstxReduxUtil.conditionalReducer() parameter violation: ');
|
295 |
|
296 | check(conditionalFn, 'conditionalFn argument is required');
|
297 | check((0, _lodash4.default)(conditionalFn), 'conditionalFn argument is NOT a function');
|
298 | check(thenReducerFn, 'thenReducerFn argument is required');
|
299 | check((0, _lodash4.default)(thenReducerFn), 'thenReducerFn argument is NOT a function');
|
300 | check((0, _lodash4.default)(elseReducerFn), 'elseReducerFn argument is NOT a function');
|
301 |
|
302 | // expose our new higher-order reducer
|
303 | // NOTE: For more info on he originalReducerState parameter, refer to the Dev Guide {{book.guide.originalReducerState}}
|
304 | return function () {
|
305 | var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
306 | var action = arguments[1];
|
307 | var originalReducerState = arguments[2];
|
308 |
|
309 |
|
310 | // maintain the originalReducerState as the immutable state
|
311 | // at the time of the start of the reduction process
|
312 | // ... in support of joinReducers()
|
313 | // ... for more info, refer to the Dev Guide {{book.guide.originalReducerState}}
|
314 | if (originalReducerState === undefined) {
|
315 | originalReducerState = state;
|
316 | }
|
317 |
|
318 | // execute either thenReducerFn or elseReducerFn, based on conditionalFn
|
319 | return conditionalFn(state, action, originalReducerState) ? thenReducerFn(state, action, originalReducerState) : elseReducerFn(state, action, originalReducerState);
|
320 | };
|
321 | }
|
322 |
|
323 | //***
|
324 | //*** Specification: conditionalReducerCB
|
325 | //***
|
326 |
|
327 | /**
|
328 | * A callback function (used in {{book.api.conditionalReducer}}) whose
|
329 | * return value determines which reducerFn is executed.
|
330 | *
|
331 | * @callback conditionalReducerCB
|
332 | *
|
333 | * @param {*} state - The current immutable state that is the
|
334 | * reduction target.
|
335 | *
|
336 | * @param {Action} action - The standard redux Action object that
|
337 | * drives the reduction process.
|
338 | *
|
339 | * @param {*} originalReducerState - The immutable state at the time
|
340 | * of the start of the reduction process.
|
341 | *
|
342 | * This is useful in determining whether state has changed within a
|
343 | * series of reductions {{book.api.joinReducers}} ... because each
|
344 | * individual reducer only has visibility of the state within it's own
|
345 | * reduction process.
|
346 | *
|
347 | * Further information can be found in the
|
348 | * {{book.guide.originalReducerState}} discussion of the {{book.guide.devGuide}}.
|
349 | *
|
350 | * @returns {truthy} A truthy value indicating which reducerFn is
|
351 | * executed ... truthy: thenReducerFn(), falsy: elseReducerFn().
|
352 | */
|
353 |
|
354 | /***/ }),
|
355 | /* 4 */
|
356 | /***/ (function(module, exports, __webpack_require__) {
|
357 |
|
358 | ;
|
359 |
|
360 |
|
361 | exports.__esModule = true;
|
362 | exports.default = joinReducers;
|
363 |
|
364 | var _lodash = __webpack_require__(0);
|
365 |
|
366 | var _lodash2 = _interopRequireDefault(_lodash);
|
367 |
|
368 | var _lodash3 = __webpack_require__(6);
|
369 |
|
370 | var _lodash4 = _interopRequireDefault(_lodash3);
|
371 |
|
372 | var _verify = __webpack_require__(1);
|
373 |
|
374 | var _verify2 = _interopRequireDefault(_verify);
|
375 |
|
376 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
377 |
|
378 | /**
|
379 | * Create a higher-order reducer by combining two or more reducers,
|
380 | * logically executing each in sequence (in essence combining their
|
381 | * functionality into one). This is useful when combining various
|
382 | * reducer types into one logical construct.
|
383 | *
|
384 | * **Please Note:** Because each reducer is able to build on what has
|
385 | * been accomplished by a prior reducer, joinReducers cumulatively
|
386 | * passes the state parameter that was returned from any prior reducer
|
387 | * (in the chain of reducers to execute). In essence this is an
|
388 | * accumulative process. While this does NOT relax the immutable
|
389 | * constraint of the reducer's state parameter, it is possible for a
|
390 | * down-stream reducer to receive a state parameter that is a
|
391 | * different instance from the start of the reduction process (because
|
392 | * an up-stream reducer needed to alter it in some way).
|
393 | *
|
394 | * The {{book.guide.devGuide}} discusses joinReducers() in more detail
|
395 | * (see {{book.guide.conceptJoin}}), and additional examples can
|
396 | * be found in {{book.guide.fullExample}}.
|
397 | *
|
398 | * @param {...reducerFn} reducerFns two or more reducer functions to join
|
399 | * together.
|
400 | *
|
401 | * @param {InitialState} [initialState] - the optional fall-back state
|
402 | * value used during the state initialization boot-strap process.
|
403 | *
|
404 | * @returns {reducerFn} a newly created reducer function (described above).
|
405 | */
|
406 | function joinReducers() {
|
407 | for (var _len = arguments.length, reducerFns = Array(_len), _key = 0; _key < _len; _key++) {
|
408 | reducerFns[_key] = arguments[_key];
|
409 | }
|
410 |
|
411 | // define our initialState parameter (optionally, the last parameter)
|
412 | // NOTE: We have to do this programatically because our function
|
413 | // accepts variable number of arguments.
|
414 | var initialState = (0, _lodash2.default)((0, _lodash4.default)(reducerFns)) ? undefined : reducerFns.pop();
|
415 |
|
416 | // validate params
|
417 | var check = _verify2.default.prefix('AstxReduxUtil.joinReducers() parameter violation: ');
|
418 |
|
419 | check(reducerFns && reducerFns.length >= 2, 'two or more reducerFn arguments are required');
|
420 |
|
421 | // ... each arg MUST be a function (reducerFn)
|
422 | var badArgNum = reducerFns.reduce(function (firstBadArgNum, reducerFn, indx) {
|
423 | return firstBadArgNum || ((0, _lodash2.default)(reducerFn) ? 0 : indx + 1);
|
424 | }, 0);
|
425 | check(!badArgNum, 'argument position number ' + badArgNum + ' is NOT a function ... expecting two or more reducerFns to join together');
|
426 |
|
427 | // expose our new higher-order reducer
|
428 | return function () {
|
429 | var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
430 | var action = arguments[1];
|
431 | var originalReducerState = arguments[2];
|
432 |
|
433 |
|
434 | // maintain the originalReducerState as the immutable state
|
435 | // at the time of the start of the reduction process
|
436 | // ... in support of joinReducers()
|
437 | // ... for more info, refer to the Dev Guide {{book.guide.originalReducerState}}
|
438 | if (originalReducerState === undefined) {
|
439 | originalReducerState = state;
|
440 | }
|
441 |
|
442 | // execute each reducerFn in sequence
|
443 | return reducerFns.reduce(function (nextState, reducerFn) {
|
444 | return reducerFn(nextState, action, originalReducerState);
|
445 | }, state);
|
446 | };
|
447 | }
|
448 |
|
449 | /***/ }),
|
450 | /* 5 */
|
451 | /***/ (function(module, exports, __webpack_require__) {
|
452 |
|
453 | ;
|
454 |
|
455 |
|
456 | exports.__esModule = true;
|
457 | exports.default = reducerHash;
|
458 |
|
459 | var _lodash = __webpack_require__(2);
|
460 |
|
461 | var _lodash2 = _interopRequireDefault(_lodash);
|
462 |
|
463 | var _lodash3 = __webpack_require__(0);
|
464 |
|
465 | var _lodash4 = _interopRequireDefault(_lodash3);
|
466 |
|
467 | var _verify = __webpack_require__(1);
|
468 |
|
469 | var _verify2 = _interopRequireDefault(_verify);
|
470 |
|
471 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
472 |
|
473 | /**
|
474 | * Create a higher-order reducer by combining a set of sub-reducer
|
475 | * functions that are indexed by the standard action.type. When no
|
476 | * action.type is acted on, the original state is merely
|
477 | * passed-through (using the [identity
|
478 | * function](https://lodash.com/docs#identity)).
|
479 | *
|
480 | * This is one of the more prevalent composition reducers, and
|
481 | * provides an alternative to the switch statement (commonly used to
|
482 | * provide this control mechanism).
|
483 | *
|
484 | * The {{book.guide.devGuide}} discusses reducerHash() in more detail (see
|
485 | * {{book.guide.conceptHash}}), and additional examples can be found in
|
486 | * {{book.guide.conceptJoin}} and {{book.guide.fullExample}}.
|
487 | *
|
488 | * **SideBar**: Because reducerHash is so central to the rudimentary
|
489 | * aspect of reduction, it is a common practice to extend it,
|
490 | * promoting a
|
491 | * [`centralized reducer-based logging capability`](/extending/logExt.md),
|
492 | * with an ability to correlate logging levels to state changes
|
493 | * *(providing a means to filter logs at a high level with minimal
|
494 | * output)*.
|
495 | *
|
496 | * @param {ActionReducerHash} actionHandlers - a hash of reducer functions,
|
497 | * indexed by the standard redux action.type.
|
498 | *
|
499 | * @param {InitialState} [initialState] - the optional fall-back state
|
500 | * value used during the state initialization boot-strap process.
|
501 | *
|
502 | * @returns {reducerFn} a newly created reducer function (described above).
|
503 | */
|
504 | function reducerHash(actionHandlers, initialState) {
|
505 |
|
506 | // validate params
|
507 | var check = _verify2.default.prefix('AstxReduxUtil.reducerHash() parameter violation: ');
|
508 |
|
509 | check(actionHandlers, 'actionHandlers is required');
|
510 |
|
511 | // ... AI: this check may be too intrusive if the client's actionHandlers object is used for OTHER things?
|
512 | var invalidHashEntry = Object.getOwnPropertyNames(actionHandlers).reduce(function (firstBadEntry, type) {
|
513 | return firstBadEntry || (0, _lodash4.default)(actionHandlers[type]) ? null : type;
|
514 | }, null);
|
515 | check(!invalidHashEntry, 'actionHandlers[\'' + invalidHashEntry + '\'] is NOT a function ... expecting reducer function indexed by action type');
|
516 |
|
517 | check(!actionHandlers['undefined'], "actionHandlers contains an 'undefined' entry ... suspect a misspelled constant");
|
518 |
|
519 | // internal function: locate handler from actionHandlers action.type hash lookup
|
520 | // ... default: identity pass-through
|
521 | var locateHandler = function locateHandler(action) {
|
522 | return actionHandlers[action.type] || _lodash2.default;
|
523 | };
|
524 |
|
525 | // expose the new reducer fn, which resolves according the the supplied actionHandlers
|
526 | return function () {
|
527 | var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
528 | var action = arguments[1];
|
529 | var originalReducerState = arguments[2];
|
530 |
|
531 |
|
532 | // maintain the originalReducerState as the immutable state
|
533 | // at the time of the start of the reduction process
|
534 | // ... in support of joinReducers()
|
535 | // ... for more info, refer to the Dev Guide {{book.guide.originalReducerState}}
|
536 | if (originalReducerState === undefined) {
|
537 | originalReducerState = state;
|
538 | }
|
539 |
|
540 | // execute the handler indexed by the action.type (or the identity pass-through)
|
541 | return locateHandler(action)(state, action, originalReducerState);
|
542 | };
|
543 | }
|
544 |
|
545 | //***
|
546 | //*** Specification: ActionReducerHash
|
547 | //***
|
548 |
|
549 | /**
|
550 | * @typedef {Object} ActionReducerHash
|
551 | *
|
552 | * A hash of reducer functions, indexed by the standard redux
|
553 | * action.type.
|
554 | *
|
555 | * @property {reducerFn} actionType1 - The reducer function servicing: 'actionType1'.
|
556 | * @property {reducerFn} actionType2 - The reducer function servicing: 'actionType2'.
|
557 | * @property {reducerFn} ...more - ...etc.
|
558 | */
|
559 |
|
560 | /***/ }),
|
561 | /* 6 */
|
562 | /***/ (function(module, exports, __webpack_require__) {
|
563 |
|
564 | ;
|
565 |
|
566 |
|
567 | /**
|
568 | * lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
569 | * Build: `lodash modern modularize exports="npm" -o ./`
|
570 | * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
571 | * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
572 | * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
573 | * Available under MIT license <https://lodash.com/license>
|
574 | */
|
575 |
|
576 | /**
|
577 | * Gets the last element of `array`.
|
578 | *
|
579 | * @static
|
580 | * @memberOf _
|
581 | * @category Array
|
582 | * @param {Array} array The array to query.
|
583 | * @returns {*} Returns the last element of `array`.
|
584 | * @example
|
585 | *
|
586 | * _.last([1, 2, 3]);
|
587 | * // => 3
|
588 | */
|
589 | function last(array) {
|
590 | var length = array ? array.length : 0;
|
591 | return length ? array[length - 1] : undefined;
|
592 | }
|
593 |
|
594 | module.exports = last;
|
595 |
|
596 | /***/ }),
|
597 | /* 7 */
|
598 | /***/ (function(module, exports, __webpack_require__) {
|
599 |
|
600 | ;
|
601 |
|
602 |
|
603 | exports.__esModule = true;
|
604 | exports.reducerHash = exports.joinReducers = exports.conditionalReducer = undefined;
|
605 |
|
606 | var _conditionalReducer = __webpack_require__(3);
|
607 |
|
608 | var _conditionalReducer2 = _interopRequireDefault(_conditionalReducer);
|
609 |
|
610 | var _joinReducers = __webpack_require__(4);
|
611 |
|
612 | var _joinReducers2 = _interopRequireDefault(_joinReducers);
|
613 |
|
614 | var _reducerHash = __webpack_require__(5);
|
615 |
|
616 | var _reducerHash2 = _interopRequireDefault(_reducerHash);
|
617 |
|
618 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
619 |
|
620 | //***
|
621 | //*** Promote all library utilities through a single module.
|
622 | //***
|
623 |
|
624 | // NOTE: This non-default export supports ES6 imports.
|
625 | // Example:
|
626 | // import { reducerHash } from 'astx-redux-util';
|
627 | // -or-
|
628 | // import * as AstxReduxUtil from 'astx-redux-util';
|
629 | exports.conditionalReducer = _conditionalReducer2.default;
|
630 | exports.joinReducers = _joinReducers2.default;
|
631 | exports.reducerHash = _reducerHash2.default;
|
632 |
|
633 | // NOTE: This default export supports CommonJS modules (otherwise Babel does NOT promote them).
|
634 | // Example:
|
635 | // const { reducerHash } = require('astx-redux-util');
|
636 | // -or-
|
637 | // const AstxReduxUtil = require('astx-redux-util');
|
638 |
|
639 | exports.default = {
|
640 | conditionalReducer: _conditionalReducer2.default,
|
641 | joinReducers: _joinReducers2.default,
|
642 | reducerHash: _reducerHash2.default
|
643 | };
|
644 |
|
645 | /***/ })
|
646 | /******/ ]);
|
647 | }); |
\ | No newline at end of file |