I'm setting up a new server, and want to save arbitrary file in my project directory. So I use Node.js path, __dirname.
I want to convert __dirname, now my __dirname is d:\algorithm-visualizer\
but I want to __dirname is d:\\\algorithm-visualizer\\\ form (have two double-escaping the backslashes).
How can I convert this form?