UNPKG

social-link-parser

Version:

Extract usernames, IDs, and metadata from social media URLs across 100+ platforms

15 lines 461 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.detectPlatform = void 0; const platforms_1 = require("../platforms"); function detectPlatform(url) { const lower = url.toLowerCase(); for (const module of platforms_1.registry.values()) { if (module.detect(lower)) { return module; } } return undefined; } exports.detectPlatform = detectPlatform; //# sourceMappingURL=detector.js.map