MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / constructor

Method constructor

tests/security/bff-proxy.test.js:9–20  ·  view source on GitHub ↗
(init = {})

Source from the content-addressed store, hash-verified

7
8 class MockHeaders {
9 constructor(init = {}) {
10 this.map = new Map();
11 if (init && typeof init.entries === 'function') {
12 Array.from(init.entries()).forEach(([key, value]) => {
13 this.set(key, value);
14 });
15 } else {
16 Object.entries(init).forEach(([key, value]) => {
17 this.set(key, value);
18 });
19 }
20 }
21
22 get(name) {
23 return this.map.get(String(name).toLowerCase()) || null;

Callers

nothing calls this directly

Calls 2

setMethod · 0.95
entriesMethod · 0.80

Tested by

no test coverage detected