I have this env variable:
export MyEnvVar="new\nline"
If I run the command "echo -ne $MyEnvVar" on a Mac terminal this is what I get:
new line
When I run the following code:
require("dotenv").config();
console.log("new\nline");
console.log("");
console.log("");
console.log(process.env.MyEnvVar);
The output:
new
line
new\nline
How can I get process.env.MyEnvVar to have multiline instead of escaping it?
dotenv documentation says it support multi-line vars. https://www.npmjs.com/package/dotenv