Returns a shallow copy of the given value.
Copying protocol
- By default
up.util.copy() can copy array-like values,
plain objects and Date instances.
- Array-like objects are copied into new arrays.
- Unsupported types of values are returned unchanged.
- To make the copying protocol work with user-defined class,
see
up.util.copy.key.
- Immutable objects, like strings or numbers, do not need to be copied.