MCPcopy Index your code
hub / github.com/nexe/nexe / replaceInFileAsync

Method replaceInFileAsync

src/compiler.ts:177–180  ·  view source on GitHub ↗
(file: string, replace: string | RegExp, value: string | StringReplacer)

Source from the content-addressed store, hash-verified

175
176 @bound
177 async replaceInFileAsync(file: string, replace: string | RegExp, value: string | StringReplacer) {
178 const entry = await this.readFileAsync(file)
179 entry.contents = entry.contents.replace(replace, value as any)
180 }
181
182 @bound
183 async setFileContentsAsync(file: string, contents: string) {

Callers 5

disableNodeCliFunction · 0.80
buildFixesFunction · 0.80
flagsFunction · 0.80
snapshot.tsFile · 0.80
mainFunction · 0.80

Calls 1

readFileAsyncMethod · 0.95

Tested by

no test coverage detected