| var LazyWrapper = require('./_LazyWrapper'), |
| LodashWrapper = require('./_LodashWrapper'), |
| reverse = require('./reverse'), |
| thru = require('./thru'); |
| * This method is the wrapper version of `_.reverse`. |
| * **Note:** This method mutates the wrapped array. |
| * @returns {Object} Returns the new `lodash` wrapper instance. |
| * _(array).reverse().value() |
| function wrapperReverse() { |
| var value = this.__wrapped__; |
| if (value instanceof LazyWrapper) { |
| if (this.__actions__.length) { |
| wrapped = new LazyWrapper(this); |
| wrapped = wrapped.reverse(); |
| wrapped.__actions__.push({ |
| return new LodashWrapper(wrapped, this.__chain__); |
| return this.thru(reverse); |
| module.exports = wrapperReverse; |