You could try sql.js. But normally your front end should never directly access the database. Just think about the authorization, there is no way in JS to hide your DB password, so everyone will see it.