Urara-Blog/node_modules/.pnpm-store/v3/files/2d/35c78becf42b6c73f74edf63dffb2411add92fe0f9fd14181f20ef96f477c02b65d8fb337298efc8c4946c5a60dfb6cc0d0e0b023ff0407ef0851523e2a46f
2022-08-14 01:14:53 +08:00

18 lines
360 B
Text

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