All files / src/utils extend.js

88.89% Statements 8/9
50% Branches 1/2
100% Functions 1/1
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19        17x   181x     181x 181x 181x 188x       181x    
/*
 * Source: https://github.com/segmentio/extend
 */
 
module.exports = function extend(object) {
  // Takes an unlimited number of extenders.
  var args = Array.prototype.slice.call(arguments, 1)
 
  // For each extender, copy their properties on our object.
  for (var i = 0, source; (source = args[i]); i++) {
    Iif (!source) continue
    for (var property in source) {
      object[property] = source[property]
    }
  }
 
  return object
}