"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeLocationAttributes = normalizeLocationAttributes;
function normalizeLocationAttributes(anchor) {
    const attributes = {
        href: anchor.href,
        protocol: (anchor.protocol || '').replace(':', ''),
        host: anchor.host || '',
        hostname: anchor.hostname || '',
        port: anchor.port || '',
        pathname: anchor.pathname || '',
        search: (anchor.search || '').replace('?', ''),
        hash: (anchor.hash || '').replace('#', ''),
        username: anchor.username || '',
        password: anchor.password || '',
    };
    return attributes;
}
