Closed wingyplus closed 1 year ago
Thanks for the pull request.
When I coded that I wanted to avoid early returns, so the function was easier to reason on (defect of using FP too much? 😆).
Sorry if the code isn't explicit in that sense.
Closing...
I think declaring ret
at the beginning of the function is also hard to read. But when I use if/else if/else
, it got reported by eslint. T_T So I ended up like this.
Not sure how you're running eslint
but we usually do as:
npm install
npm run jslint
or
npm run build-dist
if you wanna run everything required for contributing.
Use if with return instead of set to
ret
.