I have a text file and I want to send its content as a string as a response to a get request in my express app but the content already has content instances of \n in it and the node.js' readFile also adds additional \n to it which makes it hard to parse the string on the client-side. So I wanted to know that if I can change the \n added by the readFile method with something of my choice like \r or any other pattern.
File:
server.js
const fs = require ("fs")
const fileContents = fs.readFileSync ("./file.txt", "utf8")
output:
"This is texst \n string\nand I want to use \r instead of \n\nin it"