summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cli-table2/node_modules/lodash/internal/lazyClone.js
blob: 04c222b20e320f698ea3003b3e2f5e81f35b4c3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var LazyWrapper = require('./LazyWrapper'),
    arrayCopy = require('./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;
}

module.exports = lazyClone;