MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / transform

Function transform

test/backend-app.spec.ts:26–34  ·  view source on GitHub ↗
(methods: any)

Source from the content-addressed store, hash-verified

24 methods: Methods,
25): TransformEffectedMethods<Methods> => {
26 const transform = (methods: any): any =>
27 Object.fromEntries(
28 Object.entries(methods).map(([name, fnOrMethods]) => [
29 name,
30 typeof fnOrMethods === "function" ?
31 (...args: any) => effected(() => fnOrMethods(...args))
32 : transform(fnOrMethods),
33 ]),
34 );
35 return transform(methods);
36};
37

Callers 1

defineEffectedFunctionsFunction · 0.85

Calls 2

effectedFunction · 0.90
mapMethod · 0.65

Tested by

no test coverage detected