mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Bump to v4.0.0.
This commit is contained in:
22
toIterator.js
Normal file
22
toIterator.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Enables the wrapper to be iterable.
|
||||
*
|
||||
* @name Symbol.iterator
|
||||
* @memberOf _
|
||||
* @category Seq
|
||||
* @returns {Object} Returns the wrapper object.
|
||||
* @example
|
||||
*
|
||||
* var wrapped = _([1, 2]);
|
||||
*
|
||||
* wrapped[Symbol.iterator]() === wrapped;
|
||||
* // => true
|
||||
*
|
||||
* Array.from(wrapped);
|
||||
* // => [1, 2]
|
||||
*/
|
||||
function wrapperToIterator() {
|
||||
return this;
|
||||
}
|
||||
|
||||
export default wrapperToIterator;
|
||||
Reference in New Issue
Block a user