Well sorry.. its a quick hack. Its a function to run promise chains in sequence with optional mapper functions for the resolves. And the resulting resolve returns the changed map (key: original promise, value: resolve result of that promise) so you can reference results by promises you did feed the function.
I guess it doesnt help that code with 120 chars per line (pretty common standard) is getting wrapped in posts here.
--- Little warning ---
The code has bugs.. it was a first draft of something i needed at work the next day.. so dont use it for production :D
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Well sorry.. its a quick hack. Its a function to run promise chains in sequence with optional mapper functions for the resolves. And the resulting resolve returns the changed map (key: original promise, value: resolve result of that promise) so you can reference results by promises you did feed the function.
I guess it doesnt help that code with 120 chars per line (pretty common standard) is getting wrapped in posts here.
--- Little warning ---
The code has bugs.. it was a first draft of something i needed at work the next day.. so dont use it for production :D