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

Function fetchAdminData

test/README.example.proof.ts:29–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 });
28
29 const fetchAdminData = () =>
30 effected(function* () {
31 yield* requiresAdmin();
32 const data = yield* effectify(
33 fetch("https://jsonplaceholder.typicode.com/todos/1").then((res) => res.json()),
34 );
35 yield* log("Fetched data: " + JSON.stringify(data));
36 });
37
38 const program = fetchAdminData()
39 .resume("log", (msg) => {

Callers 1

Calls 3

effectedFunction · 0.90
effectifyFunction · 0.90
requiresAdminFunction · 0.70

Tested by

no test coverage detected