3.2
API
Tutorial
Demo
Install
Changes
Community
GitHub
Twitter
Menu
Menu
Edit
this page
up.util
up.util.copy(object)
JavaScript function
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.
Parameters
object
any
Return value
any
Made by
Henning Koch
Imprint
Privacy policy
This website uses cookies to improve usability and analyze traffic.
I accept
or
learn more