BVB Source Codes

reactide Show merge.js Source code

Return Download reactide: download merge.js Source code - Download reactide Source code - Type:.js
  1. "use strict";
  2.  
  3. exports.__esModule = true;
  4.  
  5. var _getIterator2 = require("babel-runtime/core-js/get-iterator");
  6.  
  7. var _getIterator3 = _interopRequireDefault(_getIterator2);
  8.  
  9. exports.default = function (dest, src) {
  10.   if (!dest || !src) return;
  11.  
  12.   return (0, _mergeWith2.default)(dest, src, function (a, b) {
  13.     if (b && Array.isArray(a)) {
  14.       var newArray = b.slice(0);
  15.  
  16.       for (var _iterator = a, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  17.         var _ref;
  18.  
  19.         if (_isArray) {
  20.           if (_i >= _iterator.length) break;
  21.           _ref = _iterator[_i++];
  22.         } else {
  23.           _i = _iterator.next();
  24.           if (_i.done) break;
  25.           _ref = _i.value;
  26.         }
  27.  
  28.         var item = _ref;
  29.  
  30.         if (newArray.indexOf(item) < 0) {
  31.           newArray.push(item);
  32.         }
  33.       }
  34.  
  35.       return newArray;
  36.     }
  37.   });
  38. };
  39.  
  40. var _mergeWith = require("lodash/mergeWith");
  41.  
  42. var _mergeWith2 = _interopRequireDefault(_mergeWith);
  43.  
  44. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  45.  
  46. module.exports = exports["default"];
downloadmerge.js Source code - Download reactide Source code
Related Source Codes/Software:
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top