Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created July 26, 2019 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/58a0d0d2e4258c3c9230a3dd00bde3f5 to your computer and use it in GitHub Desktop.
Save jasongorman/58a0d0d2e4258c3c9230a3dd00bde3f5 to your computer and use it in GitHub Desktop.
search(title, artist){
return this.contents
.filter((cd) =>
this.matches(cd, title, artist))[0];
}
matches(cd, title, artist) {
return cd.title == title && cd.artist == artist;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment