Skip to content

Instantly share code, notes, and snippets.

@JoshBarr
Created September 14, 2016 02:43
Show Gist options
  • Save JoshBarr/6e711c2ed6a05e99a5c85786cadf6057 to your computer and use it in GitHub Desktop.
Save JoshBarr/6e711c2ed6a05e99a5c85786cadf6057 to your computer and use it in GitHub Desktop.
Butter Chicken for Javascript
const getGetRowCounts = (connection) => {
return (item) => {
return connection.query('SELECT * from foo');
};
};
// Later on..
connect('some/server').then((conn) => {
const iterator = getGetRowCounts(conn);
const actions = [].map(iterator);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment