Earlier quoted context omitted.
after the web worker executes its function, it post a message to the original context with 3 arguments - the call id (c), error string(e), the successful result object(d). the greenlet function when invoked returns a promise waiting to be resolved or rejected. the resolver and rejector functions are stored in object p with the key with a unique call id. so line 18 `p[c][e?1:0](e||d);` basically means resolve or rejec…
Wow! Nice! Thank you!! WOW! I haven't touched Javascript for a long time, especially using shiny features in ES5, ES6... those arrows always throws me off. Is this a typical JS & NodeJS style nowadays? Does anyone ever feel your code and your co-workers' code are barely readable? Disclaimer: Python programmer.
* def vs lambda in Python
* fn vs closures in Rust
* def vs anonymous functions in Elixir
Honestly, given how often I find myself using small, immediately-consumed functions when performing common filter/map/reduce operations I find fat arrows to be an extremely welcome addition. I feel that it spares a lot of excessive "function" keywords everywhere and gives you just a little more room to have more verbose variable names when you have to deal with things like enforced maximum line lengths...