Skip to content

Conversation

@jlcampbell1991
Copy link
Collaborator

@hunterashaw This is a rough draft and I'd want to make some more changes before committing.

I have two goals in mind. One is to avoid state mutation, which is why I removed paginate()'s callback function and changed it to return an array of items. I'd like to find a way to refactor res and current so that we don't reassign their values.

Second is to take advantage of BC's concurrency limit. I've used Bluebird's Promise.map function. There may be a better function to use in this case. It requires a mapper function as an argument, but we don't need to transform our array, so mapper just returns the value untransformed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants