MCPcopy
hub / github.com/lodash/lodash / wrapperClone

Function wrapperClone

lodash.js:6900–6909  ·  view source on GitHub ↗

* Creates a clone of `wrapper`. * * @private * @param {Object} wrapper The wrapper to clone. * @returns {Object} Returns the cloned wrapper.

(wrapper)

Source from the content-addressed store, hash-verified

6898 * @returns {Object} Returns the cloned wrapper.
6899 */
6900 function wrapperClone(wrapper) {
6901 if (wrapper instanceof LazyWrapper) {
6902 return wrapper.clone();
6903 }
6904 var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
6905 result.__actions__ = copyArray(wrapper.__actions__);
6906 result.__index__ = wrapper.__index__;
6907 result.__values__ = wrapper.__values__;
6908 return result;
6909 }
6910
6911 /*------------------------------------------------------------------------*/
6912

Callers 2

lodashFunction · 0.85
wrapperPlantFunction · 0.85

Calls 1

copyArrayFunction · 0.85

Tested by

no test coverage detected