I am trying to escape user-generated input text, so save it in Postgres. My escape function is below:
module.exports = str => { if (!str) return str;