Is this safe to use require(\"path\").join to concatenate URLs, for example:
require(\"path\").join
require(\"path\").join(\"http://example.com\", \"ok\"); //returns
If you're using lodash, you can use this simple oneliner:
// returns part1/part2/part3 ['part1/', '/part2', '/part3/'].map((s) => _.trim(s, '/')).join('/')
inspired by @Peter Dotchev's answer