Postgres Replace In String Javascript Methods