mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
22 lines
487 B
JavaScript
22 lines
487 B
JavaScript
define(['./LazyWrapper'], function(LazyWrapper) {
|
|
|
|
/**
|
|
* Reverses the direction of lazy iteration.
|
|
*
|
|
* @private
|
|
* @name reverse
|
|
* @memberOf LazyWrapper
|
|
* @returns {Object} Returns the new reversed `LazyWrapper` object.
|
|
*/
|
|
function lazyReverse() {
|
|
var filtered = this.filtered,
|
|
result = filtered ? new LazyWrapper(this) : this.clone();
|
|
|
|
result.dir = this.dir * -1;
|
|
result.filtered = filtered;
|
|
return result;
|
|
}
|
|
|
|
return lazyReverse;
|
|
});
|