require(["esri/core/lang"], function(esriLang) { /* code goes here */ });
Object: esri/core/lang
Since: ArcGIS API for JavaScript 4.0

Provides a utility method for deeply cloning objects with properties that are computed or have their own clone() method, such as Extent.

Method Overview

NameReturn TypeSummaryObject
Object

Use this method to deeply clone objects with properties that are computed or have their own clone() method.

more details
more detailslang

Method Details

clone(elem){Object}

Use this method to deeply clone objects with properties that are computed or have their own clone() method. For example, if you are creating an object that stores an initial extent and a spatial reference for your application, you can use esriLang.clone(initialProps) to clone this object so that the extent and spatialReference are properly cloned.

Parameter:
elem Object

The object to be cloned.

Returns:
TypeDescription
ObjectA clone of the object.
Example:
require(["esri/core/lang"], function(esriLang) {
 var initialProps = {
  extent: appExtent, // app initial extent
  spatialReference: spatReference // app spatialReference
 };
 // Creates a deep clone of the object
 var clonedInitialProps = esriLang.clone(initialProps);
});

API Reference search results

NameTypeModule

There were no match results from your search criteria.