MCPcopy
hub / github.com/angular/angular / read

Method read

packages/service-worker/worker/src/db-cache.ts:77–84  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

75 }
76
77 read(key: string): Promise<any> {
78 return this.cache.match(this.request(key), this.cacheQueryOptions).then((res) => {
79 if (res === undefined) {
80 return Promise.reject(new NotFound(this.name, key));
81 }
82 return res.json();
83 });
84 }
85
86 write(key: string, value: Object): Promise<void> {
87 return this.cache.put(this.request(key), this.adapter.newResponse(JSON.stringify(value)));

Callers

nothing calls this directly

Calls 5

requestMethod · 0.95
jsonMethod · 0.80
thenMethod · 0.65
matchMethod · 0.45
rejectMethod · 0.45

Tested by

no test coverage detected