Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing true to the subresources argument which will copy the subresources.
Note: If subresources is true, this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
Note: When duplicating a resource, only exported properties are copied. Other properties will be set to their default value in the new resource.
Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing true to the subresources argument which will copy the subresources. Note: If subresources is true, this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared. Note: When duplicating a resource, only exported properties are copied. Other properties will be set to their default value in the new resource.