MCPcopy Index your code
hub / github.com/angular/angular / addFile

Method addFile

packages/service-worker/worker/testing/scope.ts:343–350  ·  view source on GitHub ↗
(url: string, contents: string, hashed: boolean = true)

Source from the content-addressed store, hash-verified

341 private files: StaticFile[] = [];
342
343 addFile(url: string, contents: string, hashed: boolean = true): AssetGroupBuilder {
344 const file: StaticFile = {url, contents, hash: undefined};
345 if (hashed) {
346 file.hash = sha1(contents);
347 }
348 this.files.push(file);
349 return this;
350 }
351
352 finish(): ConfigBuilder {
353 return this.up;

Callers 5

prefetch_spec.tsFile · 0.45
happy_spec.tsFile · 0.45
initializeSwForFunction · 0.45
data_spec.tsFile · 0.45

Calls 2

sha1Function · 0.90
pushMethod · 0.45

Tested by

no test coverage detected