MCPcopy Create free account
hub / github.com/apache/maka / normalize

Function normalize

packages/runtime/src/edit-replace.ts:223–223  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

221 function whitespaceNormalizedSpans(content: string, find: string): string[] {
222 const out: string[] = [];
223 const normalize = (text: string) => text.replace(/\s+/g, ' ').trim();
224 const normalizedFind = normalize(find);
225 if (normalizedFind === '') return out;
226 const lines = content.split('\n');

Callers 15

ensureOwnedDirectoryFunction · 0.50
isPathWithinFunction · 0.50
canonicalizePathFunction · 0.50
canonicalizePathFunction · 0.50
ensureMethod · 0.50
recoverMethod · 0.50
provisionOnceMethod · 0.50
inspectOwnedWorktreeMethod · 0.50

Calls 2

replaceMethod · 0.80
trimMethod · 0.45

Tested by

no test coverage detected