Skip to content

Instantly share code, notes, and snippets.

@chalu
Created July 18, 2019 18:04
Show Gist options
  • Save chalu/870f5c7fd0cd7ba6dc7ba7dc3e7c4fc2 to your computer and use it in GitHub Desktop.
Save chalu/870f5c7fd0cd7ba6dc7ba7dc3e7c4fc2 to your computer and use it in GitHub Desktop.
const match = (field, delegate) => {
return (data = []) => {
return data.filter(entry => delegate(entry[field]));
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment