UI for Zipcoin Blue

_LazyWrapper.js 773B

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