import * as _ from 'lodash-es';
/**
 * A helper function for constructing relative URLs for links within the exam
 */
export function url(path, options) {
    const u = new URL(path, 'http://example.com'); // hostname doesn't matter but it is required for URL constructor
    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
    _.forEach(options, (v, k) => (u[k] = v));
    const constructedPath = u.pathname + u.search + u.hash;
    return path.startsWith('/') ? constructedPath : constructedPath.substr(1);
}
//# sourceMappingURL=url.js.map