MCPcopy
hub / github.com/AndrewWalsh/openapi-devtools / import

Method import

src/lib/RequestStore.ts:46–56  ·  view source on GitHub ↗
(json: string)

Source from the content-addressed store, hash-verified

44 };
45
46 public import(json: string): boolean {
47 try {
48 const { leafMap, disabledHosts } = JSON.parse(json);
49 this.disabledHosts = new Set(disabledHosts);
50 this.store = leafMapToRouterMap(leafMap);
51 this.leafMap = leafMap;
52 return true;
53 } catch {
54 return false;
55 }
56 }
57
58 public export = (): string => {
59 return stringify({

Callers 3

onImportFunction · 0.80
MainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected