function shallowCopy(source, dest) {
  dest = dest || Object.create(null)
  for (const k in source) {
    if (hasOwnProperty(source, k)) {
      dest[k] = source[k]
    }
  }
  return dest
}
Performs a shallow copy of all properties on the source object.

@param {object} source     - The object to copy the properties from.
@param {object} [dest]  - The object to copy the properties to.
@returns {object} The destination object.