code: function setProp(to, path, value) {
  	var tmp = to,
  		i = 0,
  		old,
  		len = path.length - 1;
  	for (; i < len; ++i)
  		if (tmp && !tmp[path[i]])
  			tmp = tmp[path[i]] = {};
  		else
  			tmp = tmp[path[i]];
  	if (tmp) {
  		old = tmp[path[i]];
  		tmp[path[i]] = value;
  	}
  	return old;
  }
docs: for patch