Search algorithms for Node.js