Created
November 28, 2016 22:23
-
-
Save 5tefan/8312544c711ab9f7115b4886c9d9faea to your computer and use it in GitHub Desktop.
The worst function I've ever written
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| export function fetchAllLayers() { | |
| return function (dispatch) { | |
| return async.parallel( | |
| Object.keys(Layers).map( | |
| (layer) => { return function(cb) { | |
| fetchLayer(layer)(dispatch).then(() => cb(null, null)); | |
| }} | |
| ) | |
| ); | |
| }; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment