MCPcopy
hub / github.com/sindresorhus/got / set

Method set

source/core/utils/weakable-map.ts:5–11  ·  view source on GitHub ↗
(key: K, value: V)

Source from the content-addressed store, hash-verified

3 map = new Map<K, V>();
4
5 set(key: K, value: V): void {
6 if (typeof key === 'object') {
7 this.weakMap.set(key as unknown as Record<string, unknown>, value);
8 } else {
9 this.map.set(key, value);
10 }
11 }
12
13 get(key: K): V | undefined {
14 if (typeof key === 'object') {

Callers 15

cacheDecodedBodyFunction · 0.80
_prepareCacheMethod · 0.80
safeObjectAssignFunction · 0.80
setFunction · 0.80
#createHeadersProxyMethod · 0.80
proxyEventsFunction · 0.80
post.tsFile · 0.80
headers.tsFile · 0.80
encoding.tsFile · 0.80
redirects.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected