added necessary npm packages

This commit is contained in:
Aqeeb Imtiaz Harun
2018-08-09 11:15:09 +08:00
parent 93ee4ecb68
commit fc1b011160
2787 changed files with 243227 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
/**
* 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;