The list of Kenmei manga entries to match.
A map of search keys to AniList manga entry arrays.
Optional partial match engine configuration.
A promise resolving to an array of MangaMatchResult objects.
export async function processBatchMatches(
kenmeiMangaList: KenmeiManga[],
anilistMangaMap: Map<string, AniListManga[]>,
config: Partial<MatchEngineConfig> = {},
): Promise<MangaMatchResult[]> {
const results: MangaMatchResult[] = [];
for (const kenmeiManga of kenmeiMangaList) {
const searchKey = normalizeString(kenmeiManga.title).slice(0, 10);
const potentialMatches = anilistMangaMap.get(searchKey) || [];
// Find matches
const matchResult = findBestMatches(kenmeiManga, potentialMatches, config);
results.push(matchResult);
}
return results;
}
Processes a batch of manga entries for matching.