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, powered by microcosm.
Report a problem