MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / searchAllPageForOther

Function searchAllPageForOther

scripts/fb_GLOBAL.js:449–475  ·  view source on GitHub ↗
(
  other_uid,
  uid,
  fb_dtsg,
  pageFetchedCallback
)

Source from the content-addressed store, hash-verified

447 }
448}
449export async function searchAllPageForOther(
450 other_uid,
451 uid,
452 fb_dtsg,
453 pageFetchedCallback
454) {
455 let cursor = "";
456 let allPages = [];
457 try {
458 while (true) {
459 let { nextCursor, data, totalCount } = await searchPageForOther(
460 other_uid,
461 cursor,
462 uid,
463 fb_dtsg
464 );
465 cursor = nextCursor;
466 allPages = allPages.concat(data);
467 await pageFetchedCallback?.(data, allPages, totalCount);
468
469 if (!cursor) break;
470 }
471 } catch (e) {
472 console.log("ERROR search all page for other", e);
473 }
474 return allPages;
475}
476
477// =============================================================================
478// =================================== Group ===================================

Callers 1

Calls 2

searchPageForOtherFunction · 0.85
concatMethod · 0.80

Tested by

no test coverage detected