main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
771 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import baseCreate from './_baseCreate.js';
|
---|
| 2 | import baseLodash from './_baseLodash.js';
|
---|
| 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 | export default LazyWrapper;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.