es2015/clone.js
function cloneObject(source, traversedValues) {
  let clone = {}
  traversedValues.set(source, clone)
  
  cloneStructure(
    Object.keys(source),
    key => source[key],
    (key, value) => clone[key] = value,
    traversedValues
  )
  
  return clone
}
function cloneObject(source, traversedValues) {
  let clone = {}
  traversedValues.set(source, clone)
  
  cloneStructure(
    Object.keys(source),
    key => source[key],
    (key, value) => clone[key] = value,
    traversedValues
  )
  
  return clone
}
function cloneObject ( source , traversedValues ) { let clone = { } traversedValues . set ( source , clone ) cloneStructure ( Object . keys ( source ) , key => source [ key ] , ( key , value ) => clone [ key ] = value , traversedValues ) return clone }
Clones the provided plain object. Symbol and prototype properties are not
copied.

@param {Object<string, *>} source The object to clone.
@param {Map<Object, Object>} traversedValues A map of traversed
non-primitive keys and values. The keys are the keys and values
traversed in the source structure or structures referencing this
structure, the values are the clones of the keys and values.
@return {Object<string, *>} Source object clone.
Clones the provided plain object . Symbol and prototype properties are not copied .