code: function(base, extra, protect) {
          if (base) {
            Object.keys(extra || {}).forEach(function(key) {
              if (base[key] && protect) {
                throw new Error('utils.push attempted to overwrite "' + key + '" while running in protected mode');
              }
  
              if (typeof base[key] == 'object' && typeof extra[key] == 'object') {
                // recurse
                this.push(base[key], extra[key]);
              } else {
                // no protect, so extra wins
                base[key] = extra[key];
              }
            }, this);
          }
  
          return base;
        }
docs: updates base in place by copying properties of extra to it optionally clobber protected usage: var base = {a:2, b:6}; var extra = {c:4}; push(base, extra); //{a:2, b:6, c:4} base; //{a:2, b:6, c:4}  var base = {a:2, b:6}; var extra = {b: 4 c:4}; push(base, extra, true); //Error ("utils.push attempted to overwrite 'b' while running in protected mode") base; //{a:2, b:6}  objects with the same key will merge recursively when protect is false eg: var base = {a:16, b:{bb:4, cc:10}}; var extra = {b:{cc:25, dd:19}, c:5}; push(base, extra); //{a:16, {bb:4, cc:25, dd:19}, c:5}