Version 1
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / _iteratorToArray.js
diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/_iteratorToArray.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/_iteratorToArray.js
new file mode 100644 (file)
index 0000000..4768566
--- /dev/null
@@ -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;