"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (registries, packageName) => {
    const scope = getScope(packageName);
    return scope && registries[scope] || registries.default;
};
function getScope(pkgName) {
    if (pkgName[0] === '@') {
        return pkgName.substr(0, pkgName.indexOf('/'));
    }
    return null;
}
