MCPcopy Create free account
hub / github.com/buke/quickjs-go / close

Function close

deps/quickjs/builtin-iterator-zip.js:6–14  ·  view source on GitHub ↗
(iter)

Source from the content-addressed store, hash-verified

4 throw new TypeError(s)
5 }
6 function close(iter) {
7 try {
8 if (!iter) return
9 let method = iter.return
10 if (method) call(iter, method)
11 } catch (e) {
12 return e
13 }
14 }
15 function closeall(iters, count) {
16 let ex = undefined
17 for (let i = count; i-- > 0;) {

Calls

no outgoing calls