1
|
var baseCreate = require('./_baseCreate'),
|
2
|
baseLodash = require('./_baseLodash');
|
3
|
|
4
|
/** Used as references for the maximum length and index of an array. */
|
5
|
var MAX_ARRAY_LENGTH = 4294967295;
|
6
|
|
7
|
/**
|
8
|
* Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
|
9
|
*
|
10
|
* @private
|
11
|
* @constructor
|
12
|
* @param {*} value The value to wrap.
|
13
|
*/
|
14
|
function LazyWrapper(value) {
|
15
|
this.__wrapped__ = value;
|
16
|
this.__actions__ = [];
|
17
|
this.__dir__ = 1;
|
18
|
this.__filtered__ = false;
|
19
|
this.__iteratees__ = [];
|
20
|
this.__takeCount__ = MAX_ARRAY_LENGTH;
|
21
|
this.__views__ = [];
|
22
|
}
|
23
|
|
24
|
// Ensure `LazyWrapper` is an instance of `baseLodash`.
|
25
|
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
26
|
LazyWrapper.prototype.constructor = LazyWrapper;
|
27
|
|
28
|
module.exports = LazyWrapper;
|