MCPcopy Index your code
hub / github.com/angular/angular-cli / apply

Method apply

packages/schematics/angular/utility/change.ts:94–102  ·  view source on GitHub ↗
(host: Host)

Source from the content-addressed store, hash-verified

92 }
93
94 apply(host: Host): Promise<void> {
95 return host.read(this.path).then((content) => {
96 const prefix = content.substring(0, this.pos);
97 const suffix = content.substring(this.pos + this.toRemove.length);
98
99 // TODO: throw error if toRemove doesn't match removed string.
100 return host.write(this.path, `${prefix}${suffix}`);
101 });
102 }
103}
104
105/**

Callers

nothing calls this directly

Calls 2

readMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected