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[]> {
return kenmeiMangaList.map((kenmeiManga) => {
const searchKey = normalizeString(kenmeiManga.title).slice(0, 10);
const potentialMatches = anilistMangaMap.get(searchKey) || [];
return findBestMatches(kenmeiManga, potentialMatches, config);
});
}
Processes a batch of manga entries for matching.