es2015/clone.js
function cloneArray(source, traversedValues) {
  let clone = []
  traversedValues.set(source, clone)
  
  cloneStructure(
    source.keys(),
    key => source[key],
    (key, value) => clone[key] = value,
    traversedValues
  )
  
  return clone
}
function cloneArray(source, traversedValues) {
  let clone = []
  traversedValues.set(source, clone)
  
  cloneStructure(
    source.keys(),
    key => source[key],
    (key, value) => clone[key] = value,
    traversedValues
  )
  
  return clone
}
function cloneArray ( source , traversedValues ) { let clone = [ ] traversedValues . set ( source , clone ) cloneStructure ( source . keys ( ) , key => source [ key ] , ( key , value ) => clone [ key ] = value , traversedValues ) return clone }
Clones the provided array.

@param {*[]} source The array 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 {*[]} Source array clone.
Clones the provided array .