UNPKG

625 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.applyRemappings = void 0;
4function applyRemappings(remappings, sourceName) {
5 const selectedRemapping = { from: "", to: "" };
6 for (const [from, to] of Object.entries(remappings)) {
7 if (sourceName.startsWith(from) &&
8 from.length >= selectedRemapping.from.length) {
9 [selectedRemapping.from, selectedRemapping.to] = [from, to];
10 }
11 }
12 return sourceName.replace(selectedRemapping.from, selectedRemapping.to);
13}
14exports.applyRemappings = applyRemappings;
15//# sourceMappingURL=remappings.js.map
\No newline at end of file