MCPcopy Index your code
hub / github.com/github/docs / addToCollection

Function addToCollection

lib/page-data.js:258–266  ·  view source on GitHub ↗
(item, collection)

Source from the content-addressed store, hash-verified

256 )
257
258 async function addToCollection(item, collection) {
259 if (!item.page) return
260 collection.push(item.page)
261
262 if (!item.childPages) return
263 await Promise.all(
264 item.childPages.map(async (childPage) => await addToCollection(childPage, collection))
265 )
266 }
267
268 return pageList
269}

Callers 1

loadPageListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected