MCPcopy
hub / github.com/lingodotdev/lingo.dev / composeMutations

Function composeMutations

packages/compiler/src/_base.ts:182–195  ·  view source on GitHub ↗
(...mutations: CodeMutation[])

Source from the content-addressed store, hash-verified

180}
181
182export function composeMutations(...mutations: CodeMutation[]) {
183 return (input: CompilerPayload) => {
184 let result = input;
185 for (const mutate of mutations) {
186 const intermediateResult = mutate(result);
187 if (!intermediateResult) {
188 break;
189 } else {
190 result = intermediateResult;
191 }
192 }
193 return result;
194 };
195}
196
197export const defaultParams: CompilerParams = {
198 sourceRoot: "src",

Callers 1

transformComponentFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected