diff --git a/seh2g/index.html b/seh2g/index.html index 8b5dcf5..8487101 100644 --- a/seh2g/index.html +++ b/seh2g/index.html @@ -11,7 +11,6 @@ href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css" /> - @@ -106,18 +105,16 @@ }, computed: { results() { - return _.filter(this.books, this.bookMatches); + return this.books.filter(this.bookMatches); }, }, methods: { bookMatches(book) { - if (this.search.length < 3) { - return false; - } else - return _.includes( - _.toLower(_.toLower(JSON.stringify(book))), - _.toLower(_.toLower(this.search)) - ); + return this.search.length < 3 + ? false + : JSON.stringify(book) + .toLowerCase() + .includes(this.search.toLowerCase()); }, renderBook(book) { const text = ` @@ -130,7 +127,7 @@ const searchPattern = new RegExp(`${this.search}`, "gi"); - return _.replace(text, searchPattern, (x) => `${x}`); + return text.replace(searchPattern, (x) => `${x}`); }, }, });