MCPcopy
hub / github.com/angular/angular / arrayBuffer

Method arrayBuffer

packages/service-worker/worker/testing/fetch.ts:15–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13 constructor(public _body: string | null) {}
14
15 async arrayBuffer(): Promise<ArrayBuffer> {
16 const body = this.getBody();
17 const buffer = new ArrayBuffer(body.length);
18 const view = new Uint8Array(buffer);
19
20 for (let i = 0; i < body.length; i++) {
21 view[i] = body.charCodeAt(i);
22 }
23
24 return buffer;
25 }
26
27 async blob(): Promise<Blob> {
28 throw 'Not implemented';

Callers 3

resource_spec.tsFile · 0.80
fetch.spec.tsFile · 0.80

Calls 1

getBodyMethod · 0.95

Tested by

no test coverage detected