"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.encodeSpecialChars = void 0;
const ENCODING_TABLE = {
    '%': '%25',
    '#': '%23',
};
function encodeSpecialChars(url, encodingMap = ENCODING_TABLE) {
    return Object.entries(encodingMap).reduce(reducer, url);
}
exports.encodeSpecialChars = encodeSpecialChars;
function reducer(encodedUrl, [char, encodedChar]) {
    return encodedUrl.replace(new RegExp(char, 'g'), encodedChar);
}
;
//# sourceMappingURL=encodeSpecialChars.js.map