Files
lodash/internal/lazyClone.js
John-David Dalton 75c633becb Bump to v3.10.0.
2015-12-16 17:52:15 -08:00

24 lines
679 B
JavaScript

define(['./LazyWrapper', './arrayCopy'], function(LazyWrapper, arrayCopy) {
/**
* Creates a clone of the lazy wrapper object.
*
* @private
* @name clone
* @memberOf LazyWrapper
* @returns {Object} Returns the cloned `LazyWrapper` object.
*/
function lazyClone() {
var result = new LazyWrapper(this.__wrapped__);
result.__actions__ = arrayCopy(this.__actions__);
result.__dir__ = this.__dir__;
result.__filtered__ = this.__filtered__;
result.__iteratees__ = arrayCopy(this.__iteratees__);
result.__takeCount__ = this.__takeCount__;
result.__views__ = arrayCopy(this.__views__);
return result;
}
return lazyClone;
});