mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Bump to v3.0.0.
This commit is contained in:
28
internal/lazyClone.js
Normal file
28
internal/lazyClone.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import LazyWrapper from './LazyWrapper';
|
||||
import arrayCopy from './arrayCopy';
|
||||
|
||||
/**
|
||||
* Creates a clone of the lazy wrapper object.
|
||||
*
|
||||
* @private
|
||||
* @name clone
|
||||
* @memberOf LazyWrapper
|
||||
* @returns {Object} Returns the cloned `LazyWrapper` object.
|
||||
*/
|
||||
function lazyClone() {
|
||||
var actions = this.actions,
|
||||
iteratees = this.iteratees,
|
||||
views = this.views,
|
||||
result = new LazyWrapper(this.wrapped);
|
||||
|
||||
result.actions = actions ? arrayCopy(actions) : null;
|
||||
result.dir = this.dir;
|
||||
result.dropCount = this.dropCount;
|
||||
result.filtered = this.filtered;
|
||||
result.iteratees = iteratees ? arrayCopy(iteratees) : null;
|
||||
result.takeCount = this.takeCount;
|
||||
result.views = views ? arrayCopy(views) : null;
|
||||
return result;
|
||||
}
|
||||
|
||||
export default lazyClone;
|
||||
Reference in New Issue
Block a user