MCPcopy
hub / github.com/vitest-dev/vitest / toIterator

Function toIterator

test/core/test/expect.test.ts:96–100  ·  view source on GitHub ↗
(array: Array<T>)

Source from the content-addressed store, hash-verified

94 }
95
96 function* toIterator<T>(array: Array<T>): Iterator<T> {
97 for (const obj of array) {
98 yield obj
99 }
100 }
101
102 const customObject1 = createAnagramComparator('listen')
103 const customObject2 = createAnagramComparator('silent')

Callers 1

expect.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected