MCPcopy Index your code
hub / github.com/deployd/deployd / iteratorToArray

Function iteratorToArray

test-app/public/sinon.js:11786–11794  ·  view source on GitHub ↗

* Converts `iterator` to an array. * * @private * @param {Object} iterator The iterator to convert. * @returns {Array} Returns the converted array.

(iterator)

Source from the content-addressed store, hash-verified

11784 * @returns {Array} Returns the converted array.
11785 */
11786 function iteratorToArray(iterator) {
11787 var data,
11788 result = [];
11789
11790 while (!(data = iterator.next()).done) {
11791 result.push(data.value);
11792 }
11793 return result;
11794 }
11795
11796 /**
11797 * Converts `map` to its key-value pairs.

Callers 1

toArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected