Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
403 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | /**
|
---|
| 2 | * Enables the wrapper to be iterable.
|
---|
| 3 | *
|
---|
| 4 | * @name Symbol.iterator
|
---|
| 5 | * @memberOf _
|
---|
| 6 | * @since 4.0.0
|
---|
| 7 | * @category Seq
|
---|
| 8 | * @returns {Object} Returns the wrapper object.
|
---|
| 9 | * @example
|
---|
| 10 | *
|
---|
| 11 | * var wrapped = _([1, 2]);
|
---|
| 12 | *
|
---|
| 13 | * wrapped[Symbol.iterator]() === wrapped;
|
---|
| 14 | * // => true
|
---|
| 15 | *
|
---|
| 16 | * Array.from(wrapped);
|
---|
| 17 | * // => [1, 2]
|
---|
| 18 | */
|
---|
| 19 | function wrapperToIterator() {
|
---|
| 20 | return this;
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | module.exports = wrapperToIterator;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.