Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const url = require('url');
- const myUrl = new url.URL('http://username:password@server.com/some/path')
- const username = myUrl.username;
- const password = myUrl.password;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement