How to efficiently search an array for keywords in Node.js
Hello, I'm working on making a search engine, I already made a web crawler which stores the URLs it finds in Repl DB.
Now I'm wondering how I would efficiently search the database. The database's keys are the raw text of the webpages, the values are the URLs of the webpages.
Database.prototype.list() method returns an array of all the database's keys, so I'm thinking I'll search the array for keywords, but I'm not sure what the best method of doing this is, the best I could find is Array.prototype.filter().