MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / countOccurrences

Function countOccurrences

packages/hosts/mcp/src/create-artifact.ts:231–232  ·  view source on GitHub ↗
(haystack: string, needle: string)

Source from the content-addressed store, hash-verified

229 | { readonly ok: false; readonly message: string };
230
231const countOccurrences = (haystack: string, needle: string): number =>
232 haystack.split(needle).length - 1;
233
234/** The edited source, or the first edit that could not be applied. Messages
235 * name the edit by position and say what to do, because the model retries

Callers 1

applyArtifactEditsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected