Mocks are the Little-Death: Escaping the Mirage of Green Tests
Mocks are the Little-Death: Escaping the Mirage of Green Tests
Mocks are the Little-Death: Escaping the Mirage of Green Tests
Beyond the README: Enforcing Application Guardrails at Runtime
Time-Travel Debugging: Replaying Production Bugs Locally
Testing Side Effects Without the Side Effects
Managing Side Effects: A JavaScript Effect System in 30 Lines or Less
The Innocent Loop
Lessons from David Lynch: A Software Developer's Perspective
Runtime Diagnostics: Catching Bugs as They Happen
Writing Composable SQL using Knex and Pipelines
Self-documenting Code
Avoiding if-else Hell: The Functional Style
Firewalling Your Code
I Don't Trust My Own Code
Easy Application Deployments with Linux
You can handle complex branching using standard JavaScript. Since every pipeline is just a function returning data, you can use if/else or map to return different sub-pipelines and commands from within your logic functions. Here's an example:
const processUsersFlow = () => effectPipe( fetchAllUsers, (users) => { const tasks = users.map(user => { if (user.isAdmin) return syncAdminPermissions(user); // Sub-pipeline if (user.isGuest) return cleanupGuestAccount(user); // Sub-pipeline return notifyUser(user); // Simple Command }); return Parallel(tasks); } )();