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

Function submitOrderGen

test/README.example.spec.ts:1689–1696  ·  view source on GitHub ↗
(order: Order)

Source from the content-addressed store, hash-verified

1687
1688 // Implementation with generator syntax
1689 const submitOrderGen = (order: Order) =>
1690 effected(function* () {
1691 const [config, user] = yield* Effected.all([askConfig(), askCurrentUser()]);
1692 yield* validateOrder(order, user);
1693 const result = yield* saveOrder(order, config.apiUrl);
1694 yield* sendNotification(user.email, "Order submitted");
1695 return result;
1696 });
1697
1698 // Implementation with pipeline syntax
1699 const submitOrderPipe = (order: Order) =>

Callers 1

Calls 5

effectedFunction · 0.90
validateOrderFunction · 0.85
saveOrderFunction · 0.85
sendNotificationFunction · 0.85
allMethod · 0.80

Tested by

no test coverage detected