_LodashWrapper.js 611 B

1234567891011121314151617181920212223
  1. var baseCreate = require('./_baseCreate'),
  2. baseLodash = require('./_baseLodash');
  3. /**
  4. * The base constructor for creating `lodash` wrapper objects.
  5. *
  6. * @private
  7. * @param {*} value The value to wrap.
  8. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  9. */
  10. function LodashWrapper(value, chainAll) {
  11. this.__wrapped__ = value;
  12. this.__actions__ = [];
  13. this.__chain__ = !!chainAll;
  14. this.__index__ = 0;
  15. this.__values__ = undefined;
  16. }
  17. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  18. LodashWrapper.prototype.constructor = LodashWrapper;
  19. module.exports = LodashWrapper;