How to make strings URI/URL friendly in Node.js/JavaScript?

I had to use external API for sending SMS in Node and to get it to work I needed to send GET request with the message as a query parameter in URL. You can’t use URL if there are spaces in it, so I needed to URL encode my message first. I thought that I […]