Skip to content

Commit

Permalink
chore(#340) remove whereFileSlugEquals filter...
Browse files Browse the repository at this point in the history
... this can be replaced by the whereKeyEquals filter.
  • Loading branch information
carbontwelve committed Oct 24, 2024
1 parent 9d3d9a6 commit 599322d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ export const whereKeyEquals = (collection, key, value) =>

export const whereKeyFalse = (collection, key) => collection.filter(item => item[key] === false || typeof item[key] === 'undefined');

export const whereFileSlugEquals = (collection, value) => {
return (collection)
? collection.find(item => item.fileSlug === value)
: undefined;
};

/**
* Find and return a list item based upon its fileSlug. This is used when looking up
* bookwyrm book data as I name the review files as the open library key.
Expand Down

0 comments on commit 599322d

Please sign in to comment.