cloneObject = (obj, inheritFromObject = true) => {
  return Object.assign(inheritFromObject ? {} : Object.create(null), obj)
}
Shallow clone the given object.

@param {*} obj Object to clone
@param {boolean} inheritFromObject Whether the clone should inherit from `Object`