"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.replaceAllSubstrings = void 0;
function replaceAllSubstrings(str, replacementMap) {
    const replaceObjKeys = Object.keys(replacementMap);
    if (!replaceObjKeys.length) {
        return str;
    }
    const regex = new RegExp(replaceObjKeys.join('|'), 'gi');
    return str.replace(regex, (matched) => {
        return replacementMap[matched];
    });
}
exports.replaceAllSubstrings = replaceAllSubstrings;
//# sourceMappingURL=replaceAllSubstrings.js.map