Makes a shallow copy of a JavaScript object, array, Map, or Set.
If passed a JavaScript primitive value (string, number, boolean, or null),
it returns the value.
// {Object|Array|string|number|boolean|null} object - The object to copy
// {boolean = false} errors - Show errors?
// {Object|Array|string|number|boolean|null} - The copied object
'copy' function
Makes a shallow copy of a JavaScript object, array, Map, or Set. If passed a JavaScript primitive value (string, number, boolean, or null), it returns the value.
// {Object|Array|string|number|boolean|null} object - The object to copy // {boolean = false} errors - Show errors? // {Object|Array|string|number|boolean|null} - The copied object