'On using %5C in .npmrc which turns into "/" instead of "\"

Long story short: I'm behind a proxy and would require setting up my .npmrc to be able to "npm install ". But my username includes the domain and a "\" (ex. domain\username) which in multiple places says I'd need the encoded "%5C". So when I try to set up the config by:

npm config set proxy "http://<domain>%5C<username>:<password>@http://<proxy>:<port>"

Then run npm config get proxy: The %5C is always there instead of replacing with a "\".

ex: http://domain%5Cusername:password@http//proxy:port

And as with other posts when I do use the "\" it's replaced by "/" instead.

Any insight and how to get this to show up correctly as "\" in the .npmrc file would be much appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source