code: function mergeArray(arr, mergeItems) {
      var mergeKeys = _.chain(mergeItems)
          .keys(mergeItems)
          .map(Number)
          .value();
  
      var maxId = _.max(mergeKeys);
  
      return rangeWhile(function(i) { 
          return i < (maxId + 1) || arr.length;
      }, function(i) {
          return _.contains(mergeKeys, i) ? mergeItems[i] : arr.shift();
      });
  }
docs: Take `array` and `mergeItems` and merge them together.
  
  ## Params:
  - `array` just a regular array
  - `mergeItems` an object of `index` and `value` pairs
  
  ## Example
  
  mergeArray([], {1: true, 3: false})
  => [undefined, true, undefined, false]
  
  mergeArray([1, 2, 3], {1: true, 3: false})
  => [1, true, 2, false, 3]