code: function extend(target, source, modify) {
      var result = target ? modify ? target : extend({}, target, true) : {};
      if (!source) return result;
      for (var key in source) {
          if (source.hasOwnProperty(key) && source[key] !== undefined) {
              result[key] = source[key];
          }
      }
      return result;
  }
docs: merge two objects by extending target object with source object
  @param target object to merge
  @param source object to merge
  @param {Boolean} [modify] whether to modify the target
  @returns {Object} extended object