MCPcopy Create free account
hub / github.com/Kudo/react-native-v8 / getGeneratedSectionIndexes

Function getGeneratedSectionIndexes

plugin/src/generateCode.ts:9–18  ·  view source on GitHub ↗
(
  src: string,
  tag: string
)

Source from the content-addressed store, hash-verified

7import crypto from 'crypto';
8
9function getGeneratedSectionIndexes(
10 src: string,
11 tag: string
12): { contents: string[]; start: number; end: number } {
13 const contents = src.split('\n');
14 const start = contents.findIndex((line) => line.includes(`@generated begin ${tag}`));
15 const end = contents.findIndex((line) => line.includes(`@generated end ${tag}`));
16
17 return { contents, start, end };
18}
19
20export type MergeResults = {
21 contents: string;

Callers 1

removeGeneratedContentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected