es2015/clone.js
function cloneMap(source, traversedValues) {
  let clone = new Map()
  traversedValues.set(source, clone)
  
  cloneStructure(
    source.keys(),
    key => source.get(key),
    (key, value) => clone.set(key, value),
    traversedValues
  )
  
  return clone
}
function cloneMap(source, traversedValues) {
  let clone = new Map()
  traversedValues.set(source, clone)
  
  cloneStructure(
    source.keys(),
    key => source.get(key),
    (key, value) => clone.set(key, value),
    traversedValues
  )
  
  return clone
}
function cloneMap ( source , traversedValues ) { let clone = new Map ( ) traversedValues . set ( source , clone ) cloneStructure ( source . keys ( ) , key => source . get ( key ) , ( key , value ) => clone . set ( key , value ) , traversedValues ) return clone }
Clones the provided map.

@param {Map<*, *>} source The map 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 {Map<*, *>} Source map clone.
Clones the provided map .