"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const url_1 = require("url");
exports.subpathIsPresent = (url, subpath) => {
    if (typeof url !== 'string' || typeof subpath !== 'string') {
        return false;
    }
    const { pathname } = url_1.parse(url);
    return (typeof pathname === 'string' &&
        ((pathname.length === subpath.length + 1 && pathname === `/${subpath}`) || pathname.startsWith(`/${subpath}/`)));
};
