MCPcopy
hub / github.com/FredKSchott/snowpack / add

Method add

snowpack/src/commands/dev.ts:54–60  ·  view source on GitHub ↗
(key: string, _value: string | string[])

Source from the content-addressed store, hash-verified

52 readonly keyToValue = new Map<string, string[]>();
53 readonly valueToKey = new Map<string, string>();
54 add(key: string, _value: string | string[]) {
55 const value = Array.isArray(_value) ? _value : [_value];
56 this.keyToValue.set(key, value);
57 for (const val of value) {
58 this.valueToKey.set(val, key);
59 }
60 }
61 delete(key: string) {
62 const value = this.value(key);
63 this.keyToValue.delete(key);

Callers 15

startServerFunction · 0.95
setActiveTocFunction · 0.80
index.jsFile · 0.80
addRelationshipMethod · 0.80
broadcastMessageMethod · 0.80
connectClientMethod · 0.80
getModuleFunction · 0.80
initializeModuleFunction · 0.80
enterFunction · 0.80
loadUrlFunction · 0.80
processDirectoryFunction · 0.80
handleRequestFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected