MCPcopy Create free account
hub / github.com/Snapchat/Valdi / match

Function match

npm_modules/cli/test/helpers/ProjectHelpers.ts:97–97  ·  view source on GitHub ↗
(content: Buffer | string)

Source from the content-addressed store, hash-verified

95
96export function insertLine(position: 'before' | 'after', search: LineMatcher, content: string | Buffer): FileUpdater {
97 const match = (content: Buffer | string): boolean => search(content.toString());
98 return contents => {
99 let found = false;
100 let buffer = Buffer.from([]);

Callers 2

shouldResolveSourceMapFunction · 0.85
insertLineFunction · 0.85

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected