main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
489 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import LazyWrapper from './_LazyWrapper.js';
|
---|
| 2 |
|
---|
| 3 | /**
|
---|
| 4 | * Reverses the direction of lazy iteration.
|
---|
| 5 | *
|
---|
| 6 | * @private
|
---|
| 7 | * @name reverse
|
---|
| 8 | * @memberOf LazyWrapper
|
---|
| 9 | * @returns {Object} Returns the new reversed `LazyWrapper` object.
|
---|
| 10 | */
|
---|
| 11 | function lazyReverse() {
|
---|
| 12 | if (this.__filtered__) {
|
---|
| 13 | var result = new LazyWrapper(this);
|
---|
| 14 | result.__dir__ = -1;
|
---|
| 15 | result.__filtered__ = true;
|
---|
| 16 | } else {
|
---|
| 17 | result = this.clone();
|
---|
| 18 | result.__dir__ *= -1;
|
---|
| 19 | }
|
---|
| 20 | return result;
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | export default lazyReverse;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.