MCPcopy Create free account
hub / github.com/SAP/ui5-project / addToMap

Function addToMap

lib/graph/ShimCollection.js:4–23  ·  view source on GitHub ↗
(name, fromMap, toMap)

Source from the content-addressed store, hash-verified

2const log = getLogger("graph:ShimCollection");
3
4function addToMap(name, fromMap, toMap) {
5 /* Dynamically populate the given map "toMap" with the following structure:
6 <module-id>: [{
7 name: <shim-name>,
8 shim: <shim-configuration>
9 }, {
10 name: <shim-name>,
11 shim: <shim-configuration>
12 }, ...]
13 */
14 for (const [moduleId, shim] of Object.entries(fromMap)) {
15 if (!toMap[moduleId]) {
16 toMap[moduleId] = [];
17 }
18 toMap[moduleId].push({
19 name,
20 shim
21 });
22 }
23}
24
25class ShimCollection {
26 constructor() {

Callers 1

addProjectShimMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected