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

Function startsStatement

packages/hosts/mcp/src/create-artifact.ts:180–183  ·  view source on GitHub ↗
(code: string, at: number)

Source from the content-addressed store, hash-verified

178 * protected by their required header parens. Only a `do` that starts a
179 * statement is a loop. */
180const startsStatement = (code: string, at: number): boolean => {
181 const before = code.slice(0, at).trimEnd();
182 return before === "" || /[;{}()]$/.test(before);
183};
184
185/** The first hook called inside any loop body, or `undefined`. */
186const hookCalledInLoop = (code: string): string | undefined => {

Callers 1

hookCalledInLoopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected