File "_iteratorToArray.js"
Full path: /home/ulinin/public_html/ttt.ulinin.com/node_modules/lodash/_iteratorToArray.js
File
size: 0.35 KB (360 B bytes)
MIME-type: text/plain
Charset: utf-8
Download Open Edit Advanced Editor Back
/**
* Converts `iterator` to an array.
*
* @private
* @param {Object} iterator The iterator to convert.
* @returns {Array} Returns the converted array.
*/
function iteratorToArray(iterator) {
var data,
result = [];
while (!(data = iterator.next()).done) {
result.push(data.value);
}
return result;
}
module.exports = iteratorToArray;