MCPcopy Index your code
hub / github.com/MALSync/MALSync / getType

Function getType

src/utils/syncHandler.ts:38–46  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

36}
37
38export function getType(url) {
39 if (utils.isDomainMatching(url, 'anilist.co')) return 'ANILIST';
40 if (utils.isDomainMatching(url, 'kitsu.app')) return 'KITSU';
41 if (utils.isDomainMatching(url, 'myanimelist.net')) return 'MAL';
42 if (utils.isDomainMatching(url, 'simkl.com')) return 'SIMKL';
43 if (utils.isDomainMatching(url, 'shikimori.one')) return 'SHIKI';
44 if (utils.isDomainMatching(url, 'mangabaka.org')) return 'MANGABAKA';
45 throw 'Type not found';
46}
47
48export function mapToArray(provierList, resultList, masterM = false) {
49 for (let i = 0; i < provierList.length; i++) {

Callers 4

shouldCheckDatesFunction · 0.70
shouldCheckRewatchCountFunction · 0.70
missingCheckFunction · 0.70
syncListItemFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected