Iterates over all items in the first level of an object or array
and calls an iterator function on each item. Returns a new object or array
with the same keys or indexes as the original, and values set to the results
of the iterator function.
Does NOT recursively iterate over items in sub-objects or sub-arrays.
// {Object | Array} object - The object or array to iterate over
// {function} fn - The iterator funciton to call on each item
// {boolean = false} errors - Show errors?
// {Object | Array} - The resulting object or array
'forEachCopy' function
Iterates over all items in the first level of an object or array and calls an iterator function on each item. Returns a new object or array with the same keys or indexes as the original, and values set to the results of the iterator function.
Does NOT recursively iterate over items in sub-objects or sub-arrays.
// {Object | Array} object - The object or array to iterate over // {function} fn - The iterator funciton to call on each item // {boolean = false} errors - Show errors? // {Object | Array} - The resulting object or array