export default function (object, renameMap) {
  let keys = Object.keys(object);
  let newObject = {};

  keys.forEach((key) => {
    let newName = renameMap[key] || key;
    newObject[newName] = object[key];
  });

  return newObject;
}
