"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeDepName = exports.isGitHubRepo = void 0;
const regex_1 = require("../../../util/regex");
const githubRepoPattern = (0, regex_1.regEx)(/^https?:\/\/github\.com\/[^/]+\/[^/]+$/);
function isGitHubRepo(url) {
    return !url.includes('sponsors') && githubRepoPattern.test(url);
}
exports.isGitHubRepo = isGitHubRepo;
// https://packaging.python.org/en/latest/specifications/name-normalization/
function normalizeDepName(name) {
    return name.replace(/[-_.]+/g, '-').toLowerCase();
}
exports.normalizeDepName = normalizeDepName;
//# sourceMappingURL=common.js.map