index.js
function patch(obj, properties) {
  var old = {};
  for (var name in properties) {
    old[name] = obj[name];
    obj[name] = properties[name];
  }
  return old;
}
function patch(obj, properties) {
  var old = {};
  for (var name in properties) {
    old[name] = obj[name];
    obj[name] = properties[name];
  }
  return old;
}
function patch ( obj , properties ) { var old = { } ; for ( var name in properties ) { old [ name ] = obj [ name ] ; obj [ name ] = properties [ name ] ; } return old ; }
Overwrites properties of the given object and returns the old values
Overwrites properties of the given object and returns the old values