Skip to content

Instantly share code, notes, and snippets.

@5tefan
Created November 28, 2016 22:23
Show Gist options
  • Select an option

  • Save 5tefan/8312544c711ab9f7115b4886c9d9faea to your computer and use it in GitHub Desktop.

Select an option

Save 5tefan/8312544c711ab9f7115b4886c9d9faea to your computer and use it in GitHub Desktop.
The worst function I've ever written
...
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