A Functional Refactor of Zeebe Node with fp-ts
Don't worry, you don't need to FP to use it, it's internal!
There is no such thing as good coding, only good refactoring.
Open Source Developer Advocate
Don't worry, you don't need to FP to use it, it's internal!
There is no such thing as good coding, only good refactoring.
A StackOverflow refactoring.
This is part of a series of posts where I refactor code from StackOverflow questions, with a discussion of the changes. One of the great things about JavaScript is how scalable it is. You can start with a simple script, and there is nothing wrong with that. Usually these posts are about refactorings other than what the questioner asked about, and would be out of scope for the SO answer. There is nothing wrong with code that runs, and “There is no such thing as good coding, only good…
TLDR; only use variables for actual mutable state, and put them inside testable state machines.
There are three ways you can declare and assign in JS in 2020: