MCPcopy
hub / github.com/angular/angular-cli / apply

Method apply

packages/schematics/angular/utility/change.ts:65–72  ·  view source on GitHub ↗

* This method does not insert spaces if there is none in the original string.

(host: Host)

Source from the content-addressed store, hash-verified

63 * This method does not insert spaces if there is none in the original string.
64 */
65 apply(host: Host): Promise<void> {
66 return host.read(this.path).then((content) => {
67 const prefix = content.substring(0, this.pos);
68 const suffix = content.substring(this.pos);
69
70 return host.write(this.path, `${prefix}${this.toAdd}${suffix}`);
71 });
72 }
73}
74
75/**

Callers

nothing calls this directly

Calls 2

readMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected