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

Function submitOrderPipe

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

Source from the content-addressed store, hash-verified

1697
1698 // Implementation with pipeline syntax
1699 const submitOrderPipe = (order: Order) =>
1700 Effected.all([askConfig(), askCurrentUser()]).andThen(([config, user]) =>
1701 validateOrder(order, user).andThen(() =>
1702 saveOrder(order, config.apiUrl).tap(() =>
1703 sendNotification(user.email, "Order submitted").asVoid(),
1704 ),
1705 ),
1706 );
1707
1708 // Test configuration and user
1709 const testConfig = { apiUrl: "https://api.example.com/orders" };

Callers 1

Calls 7

validateOrderFunction · 0.85
saveOrderFunction · 0.85
sendNotificationFunction · 0.85
allMethod · 0.80
andThenMethod · 0.65
tapMethod · 0.65
asVoidMethod · 0.65

Tested by

no test coverage detected