crocks
Version:
A collection of well known Algebraic Datatypes for your utter enjoyment.
17 lines (12 loc) • 424 B
JavaScript
/** @license ISC License (c) copyright 2018 original and current authors */
/** @author Henrique Limas (HenriqueLimas) */
function cloneIterable(source) {
var copy = Object.create(Object.getPrototypeOf(source))
Object.assign(copy, source)
var symbols = Object.getOwnPropertySymbols(source)
symbols.forEach(function (symbol) {
copy[symbol] = source[symbol]
})
return copy
}
module.exports = cloneIterable