1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-02 20:00:05 +02:00
Files
minifyfromhtml/node_modules/lodash/_iteratorToArray.js
2018-05-05 13:54:07 +02:00

19 lines
360 B
JavaScript

/**
* 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;