1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.applyRemappings = void 0;
|
4 | function 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 | }
|
14 | exports.applyRemappings = applyRemappings;
|
15 |
|
\ | No newline at end of file |