MCPcopy Index your code
hub / github.com/subquery/subql / replaceArrayValueInTsManifest

Function replaceArrayValueInTsManifest

packages/cli/src/utils/utils.ts:181–184  ·  view source on GitHub ↗
(content: string, key: string, newValue: string)

Source from the content-addressed store, hash-verified

179 return pairs[0];
180}
181export function replaceArrayValueInTsManifest(content: string, key: string, newValue: string): string {
182 const [startIndex, endIndex] = findArrayIndicesTsManifest(content, key);
183 return content.slice(0, startIndex) + newValue + content.slice(endIndex + 1);
184}
185export function extractArrayValueFromTsManifest(content: string, key: string): string | null {
186 const [startIndex, endIndex] = findArrayIndicesTsManifest(content, key);
187 return content.slice(startIndex, endIndex + 1);

Callers 3

prepareProjectScaffoldTSFunction · 0.90
generateManifestTsFunction · 0.90

Calls 1

Tested by

no test coverage detected